From a3d5a805751f1cb2c12c80fb0c28db13945a0a2b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 17 Jul 2013 03:20:14 +0200 Subject: GLSL core fixes - texture2D and varying/attributes/.. preprocessing --- .../test/junit/jogl/demos/es2/shader/RedSquareShader.java | 14 +++++++++++++- .../test/junit/jogl/demos/es2/shader/texsequence_xxx.fp | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3