delete shaders after linking. They're not needed anymore and are a potential resource leak.
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user