diff options
| author | hachem <im@hachem.wtf> | 2026-08-23 21:55:36 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-23 21:55:36 +0200 |
| commit | 5ea6c14c0e14bacee766ce1280ab2c71564e05ec (patch) | |
| tree | 34620051e8eaf65db4ff9cd40ffd982a03e1ccc8 /src/platform/opengl/opengl_device.cpp | |
| parent | 8742482311b86bb705d93336805ab26881e96070 (diff) | |
[feat]: implement ui layer arch
Diffstat (limited to 'src/platform/opengl/opengl_device.cpp')
| -rw-r--r-- | src/platform/opengl/opengl_device.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/platform/opengl/opengl_device.cpp b/src/platform/opengl/opengl_device.cpp index c4332fa..8516a3c 100644 --- a/src/platform/opengl/opengl_device.cpp +++ b/src/platform/opengl/opengl_device.cpp @@ -2,8 +2,8 @@ #include "core/log.h" #include "core/hdri_manager.h" -#include "rendering/shader.h" -#include "rendering/texture.h" +#include "shader.h" +#include "texture.h" #include <glad/glad.h> #include <GLFW/glfw3.h> @@ -220,6 +220,11 @@ namespace Donut::RHI } auto shutdown() -> void override { + // Free the HDRIManager's cached GL cubemaps while our context is + // still current (they are static-singleton-owned; letting them + // destruct at program exit would glDeleteTextures after the context + // is gone and crash on close). + HDRIManager::get().clear_cache(); if (m_imgui) { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); m_imgui = false; } if (m_vao) { glDeleteVertexArrays(1, &m_vao); m_vao = 0; } } |
