summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-17 03:20:14 +0200
committerSven Gothel <[email protected]>2013-07-17 03:20:14 +0200
commita3d5a805751f1cb2c12c80fb0c28db13945a0a2b (patch)
tree98443f302af76002b248f3a02f6e2f61343a0c4a /src/test/com/jogamp
parent2b64ecaf53ffc9d0f45c73e2463cef9e74a64327 (diff)
GLSL core fixes - texture2D and varying/attributes/.. preprocessing
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java14
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texsequence_xxx.fp1
2 files changed, 14 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
index cdbf3d9b8..07f3a97cb 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
@@ -35,6 +35,11 @@ public class RedSquareShader {
" precision mediump int;\n" +
"#endif\n" +
"\n" +
+ "#if __VERSION__ >= 130\n" +
+ " #define attribute in\n" +
+ " #define varying out\n" +
+ "#endif\n"+
+ "\n" +
"uniform mat4 mgl_PMVMatrix[2];\n" +
"attribute vec4 mgl_Vertex;\n" +
"attribute vec4 mgl_Color;\n" +
@@ -52,10 +57,17 @@ public class RedSquareShader {
" precision mediump int;\n" +
"#endif\n" +
"\n" +
+ "#if __VERSION__ >= 130\n" +
+ " #define varying in\n" +
+ " out vec4 mgl_FragColor;\n" +
+ "#else\n" +
+ " #define mgl_FragColor gl_FragColor\n" +
+ "#endif\n" +
+ "\n" +
"varying vec4 frontColor;\n" +
"\n" +
"void main (void)\n" +
"{\n" +
- " gl_FragColor = frontColor;\n" +
+ " mgl_FragColor = frontColor;\n" +
"}\n" ;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texsequence_xxx.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texsequence_xxx.fp
index 5e7bd2879..e4f21f95f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texsequence_xxx.fp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texsequence_xxx.fp
@@ -3,6 +3,7 @@
#if __VERSION__ >= 130
#define varying in
out vec4 mgl_FragColor;
+ #define texture2D texture
#else
#define mgl_FragColor gl_FragColor
#endif