aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java7
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java27
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp15
4 files changed, 26 insertions, 32 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
index b750e8eb1..81c97d861 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
@@ -59,6 +59,13 @@ public class RedSquareES2 implements GLEventListener {
System.err.println(Thread.currentThread()+" RedSquareES2.init ...");
GL2ES2 gl = glad.getGL().getGL2ES2();
+ System.err.println(Thread.currentThread()+"Chosen GLCapabilities: " + glad.getChosenGLCapabilities());
+ System.err.println(Thread.currentThread()+"INIT GL IS: " + gl.getClass().getName());
+ System.err.println(Thread.currentThread()+"GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+ System.err.println(Thread.currentThread()+"GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
+ System.err.println(Thread.currentThread()+"GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
+
+
System.err.println(Thread.currentThread()+" GL Profile: "+gl.getGLProfile());
System.err.println(Thread.currentThread()+" GL:" + gl);
System.err.println(Thread.currentThread()+" GL_VERSION=" + gl.glGetString(GL.GL_VERSION));
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp
index a4b9828e0..d3cfecd94 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp
@@ -10,14 +10,11 @@
*/
#ifdef GL_ES
- #define MEDIUMP mediump
- #define HIGHP highp
-#else
- #define MEDIUMP
- #define HIGHP
+ precision mediump float;
+ precision mediump int;
#endif
-varying HIGHP vec4 frontColor;
+varying vec4 frontColor;
void main (void)
{
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 3ef62df31..cdbf3d9b8 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
@@ -31,17 +31,14 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.shader;
public class RedSquareShader {
public static String VERTEX_SHADER_TEXT =
" #ifdef GL_ES\n" +
- " #define MEDIUMP mediump\n" +
- " #define HIGHP highp\n" +
- "#else\n" +
- " #define MEDIUMP\n" +
- " #define HIGHP\n" +
+ " precision mediump float;\n" +
+ " precision mediump int;\n" +
"#endif\n" +
"\n" +
- "uniform MEDIUMP mat4 mgl_PMVMatrix[2];\n" +
- "attribute HIGHP vec4 mgl_Vertex;\n" +
- "attribute HIGHP vec4 mgl_Color;\n" +
- "varying HIGHP vec4 frontColor;\n" +
+ "uniform mat4 mgl_PMVMatrix[2];\n" +
+ "attribute vec4 mgl_Vertex;\n" +
+ "attribute vec4 mgl_Color;\n" +
+ "varying vec4 frontColor;\n" +
"\n" +
"void main(void)\n" +
"{\n" +
@@ -50,19 +47,15 @@ public class RedSquareShader {
"}\n" ;
public static String FRAGMENT_SHADER_TEXT =
- "#ifdef GL_ES\n" +
- " #define MEDIUMP mediump\n" +
- " #define HIGHP highp\n" +
- "#else\n" +
- " #define MEDIUMP\n" +
- " #define HIGHP\n" +
+ " #ifdef GL_ES\n" +
+ " precision mediump float;\n" +
+ " precision mediump int;\n" +
"#endif\n" +
"\n" +
- "varying HIGHP vec4 frontColor;\n" +
+ "varying vec4 frontColor;\n" +
"\n" +
"void main (void)\n" +
"{\n" +
" gl_FragColor = frontColor;\n" +
"}\n" ;
-
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp
index 305f5c2c2..bfd44c8f4 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp
@@ -10,17 +10,14 @@
*/
#ifdef GL_ES
- #define MEDIUMP mediump
- #define HIGHP highp
-#else
- #define MEDIUMP
- #define HIGHP
+ precision mediump float;
+ precision mediump int;
#endif
-uniform MEDIUMP mat4 mgl_PMVMatrix[2];
-attribute HIGHP vec4 mgl_Vertex;
-attribute HIGHP vec4 mgl_Color;
-varying HIGHP vec4 frontColor;
+uniform mat4 mgl_PMVMatrix[2];
+attribute vec4 mgl_Vertex;
+attribute vec4 mgl_Color;
+varying vec4 frontColor;
void main(void)
{