Bring back text and rebuild the shadows after spawn.
This commit is contained in:
parent
4747d297e8
commit
995de63671
2 changed files with 4 additions and 2 deletions
|
|
@ -135,7 +135,7 @@ void update(GLFWwindow* window, std::shared_ptr<Scene> scene) {
|
||||||
|
|
||||||
void render(GLFWwindow* window, std::shared_ptr<Scene> scene, Text &text) {
|
void render(GLFWwindow* window, std::shared_ptr<Scene> scene, Text &text) {
|
||||||
scene->render(window);
|
scene->render(window);
|
||||||
// text.render(text_content, 25.0f, 25.0f, 1.0f, glm::vec3(1.0, 0.0f, 0.0f));
|
text.render(text_content, 25.0f, 25.0f, 1.0f, glm::vec3(1.0, 0.0f, 0.0f));
|
||||||
glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ void Scene::render_scene(GLFWwindow* window, Shader& with_shader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::render_shadows(GLFWwindow* window) {
|
void Scene::render_shadows(GLFWwindow* window) {
|
||||||
|
|
||||||
glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT);
|
glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT);
|
||||||
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
|
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
@ -194,6 +193,9 @@ void Scene::spawn(const std::string& name) {
|
||||||
camera.position,
|
camera.position,
|
||||||
rot,
|
rot,
|
||||||
1.0f);
|
1.0f);
|
||||||
|
|
||||||
|
// rebuild the shadows
|
||||||
|
shadows_rendered = false;
|
||||||
} else {
|
} else {
|
||||||
dbc::log($F("No model named: {}", name));
|
dbc::log($F("No model named: {}", name));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue