From 2e5c5fdf8c1ec42b63d4fc8b88189e0bed4f1bbe Mon Sep 17 00:00:00 2001 From: Archie Hilton Date: Tue, 14 May 2024 21:48:49 +0100 Subject: [PATCH] Delete shaders after program compilation --- src/GLProgramLoader.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GLProgramLoader.cc b/src/GLProgramLoader.cc index 9d07654..84918f7 100644 --- a/src/GLProgramLoader.cc +++ b/src/GLProgramLoader.cc @@ -79,5 +79,9 @@ GLuint compile_and_link_program(const std::vector throw GLProgramException(std::format("Program {} link failed:\n{}", program_id, error_log)); } + for (auto &s:shader_ids) { + glDeleteShader(s); + } + return program_id; -} \ No newline at end of file +}