diff options
Diffstat (limited to 'src/classes/com/sun/opengl/util/glsl/ShaderCode.java')
-rw-r--r-- | src/classes/com/sun/opengl/util/glsl/ShaderCode.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/util/glsl/ShaderCode.java b/src/classes/com/sun/opengl/util/glsl/ShaderCode.java index 288ef760b..f5ed88ff0 100644 --- a/src/classes/com/sun/opengl/util/glsl/ShaderCode.java +++ b/src/classes/com/sun/opengl/util/glsl/ShaderCode.java @@ -244,11 +244,21 @@ public class ShaderCode { return valid; } - public void release(GL2ES2 gl) { + public void destroy(GL2ES2 gl) { if(isValid()) { - gl.glDeleteShader(shader()); + if(null!=gl) { + gl.glDeleteShader(shader()); + } valid=false; } + if(null!=shaderBinary) { + shaderBinary.clear(); + shaderBinary=null; + } + shaderSource=null; + shaderBinaryFormat=-1; + shaderType=-1; + id=null; } public boolean equals(Object obj) { |