aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
index bcafc02f7..e23c31c23 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
@@ -39,11 +39,13 @@ public class GLSLSimpleProgram {
private int shaderProgram;
private int vertShader;
private int fragShader;
+ private boolean isValid;
private GLSLSimpleProgram(int shaderProgram, int vertShader, int fragShader) {
this.shaderProgram = shaderProgram;
this.vertShader = vertShader;
this.fragShader = fragShader;
+ this.isValid = true;
}
public static GLSLSimpleProgram create(GL2ES2 gl, String vertShaderCode, String fragShaderCode, boolean link) {
@@ -105,6 +107,10 @@ public class GLSLSimpleProgram {
gl.glDetachShader(shaderProgram, fragShader);
gl.glDeleteShader(fragShader);
gl.glDeleteProgram(shaderProgram);
+ isValid = false;
+ shaderProgram = 0;
+ vertShader = 0;
+ fragShader = 0;
}
public int getFragShader() {
@@ -118,4 +124,8 @@ public class GLSLSimpleProgram {
public int getVertShader() {
return vertShader;
}
+
+ public boolean isValid() {
+ return isValid;
+ }
}