Properly flush shader cache
This commit is contained in:
@@ -23,6 +23,11 @@ void RendererGL::reset() {
|
||||
colourBufferCache.reset();
|
||||
textureCache.reset();
|
||||
|
||||
for (auto& shader : shaderCache) {
|
||||
shader.second.program.free();
|
||||
}
|
||||
shaderCache.clear();
|
||||
|
||||
// Init the colour/depth buffer settings to some random defaults on reset
|
||||
colourBufferLoc = 0;
|
||||
colourBufferFormat = PICA::ColorFmt::RGBA8;
|
||||
@@ -899,6 +904,11 @@ void RendererGL::deinitGraphicsContext() {
|
||||
depthBufferCache.reset();
|
||||
colourBufferCache.reset();
|
||||
|
||||
for (auto& shader : shaderCache) {
|
||||
shader.second.program.free();
|
||||
}
|
||||
shaderCache.clear();
|
||||
|
||||
// All other GL objects should be invalidated automatically and be recreated by the next call to initGraphicsContext
|
||||
// TODO: Make it so that depth and colour buffers get written back to 3DS memory
|
||||
printf("RendererGL::DeinitGraphicsContext called\n");
|
||||
|
||||
Reference in New Issue
Block a user