From 5ea6c14c0e14bacee766ce1280ab2c71564e05ec Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 23 Aug 2026 21:55:36 +0200 Subject: [feat]: implement ui layer arch --- src/platform/opengl/opengl_device.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/platform/opengl/opengl_device.cpp') 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 #include @@ -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; } } -- cgit v1.3