summaryrefslogtreecommitdiffstats
path: root/src/test-native/bug1398/shader
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-02-21 15:03:42 +0100
committerSven Gothel <[email protected]>2020-02-21 15:03:42 +0100
commitf4f92cdc0eb89c62070a865601527097e6d5cc72 (patch)
treeed22c616191ca569fbcf31b3c8418fb225522b13 /src/test-native/bug1398/shader
parent4fad4869d4a929739c830f6ce3ac171d8dd5427a (diff)
Bug 1398: Fixing native test allowing its execution using JOGL 2.3.2 and latest tip using XCode 11
Changes to test - Using own 'NSApplicationMain' entry to avoid the 'missing Info.plist' message! - Configurable CLASSPATH and LIBPATH at compile time. Note that the java.library.path is now hardcoded as well. - Don't close stderr in test, just fflush - Don't close the JVM after launch via 'die(env)', let it run. - Java: Add GLEventListener RedSquareES2 to see something in action @ 30fps - Java: GLCanvase visible bounds
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);
+}
+