summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-16 03:30:33 +0200
committerSven Gothel <[email protected]>2011-05-16 03:30:33 +0200
commitf3de07e479c7849d0172a03bb82ce9189da5679e (patch)
tree03d50949920ceeb58ee6214687d2837b926c240e /src/jogl/classes/com/jogamp
parent2f89bf30607281bb8dc0a07b185fa403b9b0f093 (diff)
Fix ShaderState useProgram() case: on && program not linked (yet)
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-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 {