From c59f78a4c3dbe9bb63119d1ece781d8f732b58e4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 19 Jan 2013 09:20:10 +0100 Subject: Adapt to change 5060b728b26a89a14367f8fca9f4eb7968f719ca: ShaderState.uniform(..) returns false if no location available. --- src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes') 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()); } } -- cgit v1.2.3