delete shaders after linking. They're not needed anymore and are a potential resource leak.

This commit is contained in:
Peter Tissen
2015-06-25 00:31:21 +02:00
parent 600e34d1fe
commit 6bbcbb1fc7

View File

@@ -451,6 +451,8 @@ public class CurveRenderState {
String error = GL20.glGetProgramInfoLog(program, 1024); String error = GL20.glGetProgramInfoLog(program, 1024);
Log.error("Program linking failed.", new Exception(error)); Log.error("Program linking failed.", new Exception(error));
} }
GL20.glDeleteShader(vtxShdr);
GL20.glDeleteShader(frgShdr);
attribLoc = GL20.glGetAttribLocation(program, "in_position"); attribLoc = GL20.glGetAttribLocation(program, "in_position");
texCoordLoc = GL20.glGetAttribLocation(program, "in_tex_coord"); texCoordLoc = GL20.glGetAttribLocation(program, "in_tex_coord");
texLoc = GL20.glGetUniformLocation(program, "tex"); texLoc = GL20.glGetUniformLocation(program, "tex");