aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl/shader
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-05-18 05:41:27 +0200
committerSven Gothel <[email protected]>2013-05-18 05:41:27 +0200
commitf650e6b37407aaa3ef6c16e7daf6423103b94ddf (patch)
treec14d726225919bc517b03a808687c463afaa206d /src/jogl/classes/jogamp/graph/curve/opengl/shader
parent6655194e6d206807b8cf1a14cffb005dde673e26 (diff)
Fix regression of commit b2802021acf8aa9b363ebef383c8dc8c8079ffa4 (Bug 711): varying in/out mapping is different in vertex/fragment shader!
Vertex shader: varying -> out Fragemnt shader: varying -> in NV GLSL compiler ignored in/out direction, where ATI GLSL compiler failed (could not find gcu_Weight, due to dead code).
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/shader')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass-weight.fp1
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass.fp1
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass-weight.fp1
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass.fp1
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp5
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl4
7 files changed, 9 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl
index ced118c1c..108247c9c 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl
@@ -2,10 +2,6 @@
#ifndef attributes_glsl
#define attributes_glsl
-#if __VERSION__ >= 130
- #define attribute in
-#endif
-
// attribute vec3 gca_Vertices;
attribute vec4 gca_Vertices;
attribute vec2 gca_TexCoords;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass-weight.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass-weight.fp
index ca03e605c..7643dab7b 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass-weight.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass-weight.fp
@@ -5,6 +5,7 @@
//
#if __VERSION__ >= 130
+ #define varying in
out vec4 mgl_FragColor;
#else
#define mgl_FragColor gl_FragColor
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass.fp
index b978b62d1..e12eef4b1 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-1pass.fp
@@ -5,6 +5,7 @@
//
#if __VERSION__ >= 130
+ #define varying in
out vec4 mgl_FragColor;
#else
#define mgl_FragColor gl_FragColor
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass-weight.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass-weight.fp
index 9440f314c..06edbeaee 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass-weight.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass-weight.fp
@@ -5,6 +5,7 @@
//
#if __VERSION__ >= 130
+ #define varying in
out vec4 mgl_FragColor;
#else
#define mgl_FragColor gl_FragColor
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass.fp
index 0d878f2e4..07a005709 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-2pass.fp
@@ -5,6 +5,7 @@
//
#if __VERSION__ >= 130
+ #define varying in
out vec4 mgl_FragColor;
#else
#define mgl_FragColor gl_FragColor
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
index 64a6835ec..4b5c8b1e2 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01.vp
@@ -1,5 +1,10 @@
//Copyright 2010 JogAmp Community. All rights reserved.
+#if __VERSION__ >= 130
+ #define attribute in
+ #define varying out
+#endif
+
#include uniforms.glsl
#include attributes.glsl
#include varyings.glsl
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl
index 3b9a3b727..7a9bc5a07 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl
@@ -2,10 +2,6 @@
#ifndef varyings_glsl
#define varyings_glsl
-#if __VERSION__ >= 130
- #define varying out
-#endif
-
//varying vec4 gcv_FrontColor;
varying vec2 gcv_TexCoord;