aboutsummaryrefslogtreecommitdiffstats
path: root/src/test-native/bug1398/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/test-native/bug1398/shader')
-rw-r--r--src/test-native/bug1398/shader/RedSquareShader.fp16
-rw-r--r--src/test-native/bug1398/shader/RedSquareShader.vp18
-rw-r--r--src/test-native/bug1398/shader/RedSquareShader2.fp16
3 files changed, 50 insertions, 0 deletions
diff --git a/src/test-native/bug1398/shader/RedSquareShader.fp b/src/test-native/bug1398/shader/RedSquareShader.fp
new file mode 100644
index 000000000..60b92401e
--- /dev/null
+++ b/src/test-native/bug1398/shader/RedSquareShader.fp
@@ -0,0 +1,16 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+#if __VERSION__ >= 130
+ #define varying in
+ out vec4 mgl_FragColor;
+#else
+ #define mgl_FragColor gl_FragColor
+#endif
+
+varying vec4 frontColor;
+
+void main (void)
+{
+ mgl_FragColor = frontColor;
+}
+
diff --git a/src/test-native/bug1398/shader/RedSquareShader.vp b/src/test-native/bug1398/shader/RedSquareShader.vp
new file mode 100644
index 000000000..9283dd7bd
--- /dev/null
+++ b/src/test-native/bug1398/shader/RedSquareShader.vp
@@ -0,0 +1,18 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+#if __VERSION__ >= 130
+ #define attribute in
+ #define varying out
+#endif
+
+uniform mat4 mgl_PMVMatrix[2];
+attribute vec4 mgl_Vertex;
+attribute vec4 mgl_Color;
+varying vec4 frontColor;
+
+void main(void)
+{
+ frontColor=mgl_Color;
+ gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex;
+}
+
diff --git a/src/test-native/bug1398/shader/RedSquareShader2.fp b/src/test-native/bug1398/shader/RedSquareShader2.fp
new file mode 100644
index 000000000..25a2df2d7
--- /dev/null
+++ b/src/test-native/bug1398/shader/RedSquareShader2.fp
@@ -0,0 +1,16 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+#if __VERSION__ >= 130
+ #define varying in
+ out vec4 mgl_FragColor;
+#else
+ #define mgl_FragColor gl_FragColor
+#endif
+
+varying vec4 frontColor;
+
+void main (void)
+{
+ mgl_FragColor = vec4(0.0, frontColor.g, frontColor.b, 1.0);
+}
+