diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java | 8 |
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()); } } |