aboutsummaryrefslogtreecommitdiffstats
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
parent50f997557b91a2f014ef0c2ea848c5c326d0cfb2 (diff)
Adapt to change 5060b728b26a89a14367f8fca9f4eb7968f719ca: ShaderState.uniform(..) returns false if no location available.
-rwxr-xr-xmake/scripts/tests.sh4
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java8
2 files changed, 7 insertions, 5 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index a2cca3211..8f8d67c13 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -295,7 +295,7 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.ect.TestExclusiveContext11VSyncAnimNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.ect.TestExclusiveContext12FPSAnimNEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $*
-testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableDelegateOnOffscrnCapsNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableFactoryOffscrnCapsNEWT $*
@@ -492,7 +492,7 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#
#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT10 $*
#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT00 $*
-#testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $*
+testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $*
#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT01 $*
#testnoawt com.jogamp.opengl.test.junit.graph.demos.ui.UINewtDemo01 $*
#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01 $*
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());
}
}