summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-19 09:20:10 +0100
committerSven Gothel <[email protected]>2013-01-19 09:20:10 +0100
commitc59f78a4c3dbe9bb63119d1ece781d8f732b58e4 (patch)
tree64b06ed7ea791c119ced6edb4fd8ae88256059f6 /src/jogl/classes/com/jogamp/graph
parent50f997557b91a2f014ef0c2ea848c5c326d0cfb2 (diff)
Adapt to change 5060b728b26a89a14367f8fca9f4eb7968f719ca: ShaderState.uniform(..) returns false if no location available.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
index 3c23733a5..fcccf592e 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -139,8 +139,10 @@ public abstract class Renderer {
throw new GLException("Error setting PMVMatrix in shader: "+rs.getShaderState());
}
- if(!rs.getShaderState().uniform(gl, rs.getWeight())) {
- throw new GLException("Error setting weight in shader: "+rs.getShaderState());
+ if( Region.isNonUniformWeight( getRenderModes() ) ) {
+ if(!rs.getShaderState().uniform(gl, rs.getWeight())) {
+ throw new GLException("Error setting weight in shader: "+rs.getShaderState());
+ }
}
if(!rs.getShaderState().uniform(gl, rs.getAlpha())) {
@@ -181,7 +183,7 @@ public abstract class Renderer {
throw new IllegalArgumentException("Weight out of range");
}
rs.getWeight().setData(v);
- if(null != gl && rs.getShaderState().inUse()) {
+ if(null != gl && rs.getShaderState().inUse() && Region.isNonUniformWeight( getRenderModes() ) ) {
rs.getShaderState().uniform(gl, rs.getWeight());
}
}