aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-29 12:10:08 +0100
committerSven Gothel <[email protected]>2012-10-29 12:10:08 +0100
commit6936c2e99ab767a96dce0e1fe386481611ea2a18 (patch)
tree0ccf4cdd6e1a64b078fe32e7b831668c9137a453
parentedb04d01099135ac400cd9d84bda6d0b6ca56953 (diff)
Fix GLSL unit tests - Add GLSL version customization, fix one wrong 'HIGHP' usage
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java6
5 files changed, 16 insertions, 9 deletions
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 9a31e2bb5..60b92401e 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
@@ -7,7 +7,7 @@
#define mgl_FragColor gl_FragColor
#endif
-varying vec4 frontColor;
+varying vec4 frontColor;
void main (void)
{
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp
index 40a21a1a3..25a2df2d7 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp
@@ -7,7 +7,7 @@
#define mgl_FragColor gl_FragColor
#endif
-varying HIGHP vec4 frontColor;
+varying vec4 frontColor;
void main (void)
{
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
index 987dedc65..e64c3de19 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
@@ -74,9 +74,11 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
final ShaderState st = new ShaderState();
final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "RedSquareShader", false);
+ "shader/bin", "RedSquareShader", true);
final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "RedSquareShader", false);
+ "shader/bin", "RedSquareShader", true);
+ rsVp.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_vp);
+ rsFp.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_fp);
final ShaderProgram sp = new ShaderProgram();
Assert.assertTrue(0>sp.program());
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
index 91dcfc3c3..69736f33b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
@@ -81,11 +81,14 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
final ShaderState st = new ShaderState();
final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "RedSquareShader", false);
+ "shader/bin", "RedSquareShader", true);
final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "RedSquareShader", false);
+ "shader/bin", "RedSquareShader", true);
final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "RedSquareShader2", false);
+ "shader/bin", "RedSquareShader2", true);
+ rsVp0.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_vp);
+ rsFp0.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_fp);
+ rsFp1.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_fp);
final ShaderProgram sp1 = new ShaderProgram();
sp1.add(rsVp0);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
index 87d317037..a7fe9a064 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
@@ -74,9 +74,11 @@ public class TestRulerNEWT01 extends UITestCase {
final ShaderState st = new ShaderState();
final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "default", false);
+ "shader/bin", "default", true);
final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquareES2.class, "shader",
- "shader/bin", "ruler", false);
+ "shader/bin", "ruler", true);
+ vp0.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_vp);
+ fp0.defaultShaderCustomization(gl, true, ShaderCode.es2_default_precision_fp);
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);