aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
index e51998a87..d0de473b4 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
@@ -148,13 +148,17 @@ public class ShaderState {
resetAllAttributes(gl);
resetAllUniforms(gl);
}
- } else if(resetAllShaderData) {
- setAllAttributes(gl);
+ } else {
+ if(resetAllShaderData) {
+ setAllAttributes(gl);
+ }
if(!shaderProgram.link(gl, System.err)) {
throw new GLException("could not link program: "+shaderProgram);
}
shaderProgram.useProgram(gl, true);
- resetAllUniforms(gl);
+ if(resetAllShaderData) {
+ resetAllUniforms(gl);
+ }
}
resetAllShaderData = false;
} else {