Bring back text and rebuild the shadows after spawn.

This commit is contained in:
Zed A. Shaw 2026-09-22 14:25:52 -04:00
parent 4747d297e8
commit 995de63671
2 changed files with 4 additions and 2 deletions

View file

@ -135,7 +135,7 @@ void update(GLFWwindow* window, std::shared_ptr<Scene> scene) {
void render(GLFWwindow* window, std::shared_ptr<Scene> scene, Text &text) {
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);
}

View file

@ -53,7 +53,6 @@ void Scene::render_scene(GLFWwindow* window, Shader& with_shader) {
}
void Scene::render_shadows(GLFWwindow* window) {
glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT);
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@ -194,6 +193,9 @@ void Scene::spawn(const std::string& name) {
camera.position,
rot,
1.0f);
// rebuild the shadows
shadows_rendered = false;
} else {
dbc::log($F("No model named: {}", name));
}