From 319df2d4d79f214b95def7b326207dcd4a6fbd27 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 10 Apr 2013 23:21:40 -0500 Subject: [PATCH] Fix zone memory leak in OpenGL2 renderer meminfo command showed the dynamic renderer zone amount going up by 1824 bytes each time I reloaded map using map command. --- code/renderergl2/tr_glsl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/renderergl2/tr_glsl.c b/code/renderergl2/tr_glsl.c index 7b9b180c..93b78a1a 100644 --- a/code/renderergl2/tr_glsl.c +++ b/code/renderergl2/tr_glsl.c @@ -1408,10 +1408,18 @@ void GLSL_ShutdownGPUShaders(void) GLSL_DeleteGPUShader(&tr.shadowmapShader); GLSL_DeleteGPUShader(&tr.pshadowShader); GLSL_DeleteGPUShader(&tr.down4xShader); - + GLSL_DeleteGPUShader(&tr.bokehShader); + GLSL_DeleteGPUShader(&tr.tonemapShader); + for ( i = 0; i < 2; i++) GLSL_DeleteGPUShader(&tr.calclevels4xShader[i]); + GLSL_DeleteGPUShader(&tr.shadowmaskShader); + GLSL_DeleteGPUShader(&tr.ssaoShader); + + for ( i = 0; i < 2; i++) + GLSL_DeleteGPUShader(&tr.depthBlurShader[i]); + glState.currentProgram = 0; qglUseProgramObjectARB(0); }