From 3b6e6caeb24a112a2b1fbee5f54bbdc0bbf865c0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 11 Jun 2014 01:29:30 +0200 Subject: Graph: Fix GLSL issue w/ ES3, add 'const float sample_count', since define SAMPLE_COUNT is of type 'int' --- src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java index bb191e651..e8dc5f090 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -287,6 +287,7 @@ public class RegionRenderer { private static String USE_COLOR_CHANNEL = "#define USE_COLOR_CHANNEL 1\n"; private static String USE_COLOR_TEXTURE = "#define USE_COLOR_TEXTURE 1\n"; private static String DEF_SAMPLE_COUNT = "#define SAMPLE_COUNT "; + private static String CONST_SAMPLE_COUNT = "const float sample_count = "; private static String MAIN_BEGIN = "void main (void)\n{\n"; private static final String gcuTexture2D = "gcuTexture2D"; @@ -477,6 +478,7 @@ public class RegionRenderer { } if( !pass1 ) { posFp = rsFp.insertShaderSource(0, posFp, DEF_SAMPLE_COUNT+sel1.sampleCount+"\n"); + posFp = rsFp.insertShaderSource(0, posFp, CONST_SAMPLE_COUNT+sel1.sampleCount+".0;\n"); } final String texLookupFuncName; -- cgit v1.2.3