Delete shaders after program compilation

This commit is contained in:
Archie Hilton 2024-05-14 21:48:49 +01:00
parent f5883d0219
commit 2e5c5fdf8c
1 changed files with 5 additions and 1 deletions

View File

@ -79,5 +79,9 @@ GLuint compile_and_link_program(const std::vector<std::pair<GLuint, std::string>
throw GLProgramException(std::format("Program {} link failed:\n{}", program_id, error_log)); throw GLProgramException(std::format("Program {} link failed:\n{}", program_id, error_log));
} }
for (auto &s:shader_ids) {
glDeleteShader(s);
}
return program_id; return program_id;
} }