aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-16 07:49:12 +0200
committerSven Gothel <[email protected]>2013-07-16 07:49:12 +0200
commit9feaa5e48c7f8df0ad0f1e667d43008e6ca5b02a (patch)
treef54c954b0b08947c3d3dfbdc553bd9f2ea79588d
parentc3b66d6f37fddbf432e20a97b49eb308d31c9c50 (diff)
Tests: Cleanup for GL core usage p2 - (Proper GLSL version number)
-rw-r--r--make/scripts/tests.sh10
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java4
6 files changed, 23 insertions, 23 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 7484d5afe..9e7be06d9 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -88,7 +88,7 @@ function jrun() {
#D_ARGS="-Djogl.debug.FBObject -Djogl.debug.TraceGL -Djogl.debug.GLBufferStateTracker"
#D_ARGS="-Djogl.debug.FBObject"
#D_ARGS="-Djogl.debug.GLSLCode"
- #D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.DebugGL -Djogl.debug.TraceGL"
+ D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.DebugGL"
#D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.JAWT -Dnewt.debug.Window"
#D_ARGS="-Dnativewindow.debug.JAWT -Djogamp.debug.TaskBase.TraceSource"
#D_ARGS="-Djogl.debug.GLContext.TraceSwitch"
@@ -614,14 +614,6 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting04AWT $*
# NEW
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOAutoDrawableFactoryNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestBug605FlippedImageNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestBug605FlippedImageAWT $*
-
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.glels.TestGLContextDrawableSwitch11NEWT $*
-
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting04AWT $*
-
$spath/count-edt-start.sh java-run.log
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
index cc8927c24..3120a1832 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
@@ -232,10 +232,13 @@ public class ElektronenMultiplizierer implements GLEventListener {
st = new ShaderState();
final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(), "shader",
- "shader/bin", "default", false);
+ "shader/bin", "default", true);
final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(), "shader",
- "shader/bin", "elektronenmultiplizierer_development", false);
- // "shader", "shader/bin", "elektronenmultiplizierer_port", false);
+ "shader/bin", "elektronenmultiplizierer_development", true);
+ // "shader", "shader/bin", "elektronenmultiplizierer_port", true);
+ vp0.defaultShaderCustomization(gl, true, true);
+ fp0.defaultShaderCustomization(gl, true, true);
+
final ShaderProgram sp0 = new ShaderProgram();
sp0.add(gl, vp0, System.err);
sp0.add(gl, fp0, System.err);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java
index e22b00dff..25e6f5ce6 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java
@@ -28,7 +28,6 @@
package com.jogamp.opengl.test.junit.jogl.demos.es2.newt;
-import com.jogamp.common.os.Platform;
import com.jogamp.newt.event.KeyAdapter;
import com.jogamp.newt.event.KeyEvent;
import com.jogamp.newt.event.TraceWindowAdapter;
@@ -45,7 +44,6 @@ import javax.media.opengl.GLProfile;
import org.junit.Assert;
import org.junit.BeforeClass;
-import org.junit.AfterClass;
import org.junit.Test;
/**
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 65b86c6ab..98acea6ac 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
@@ -314,9 +314,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, true);
+ rsFp.defaultShaderCustomization(gl, true, true);
final ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
@@ -401,9 +403,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, true);
+ rsFp.defaultShaderCustomization(gl, true, true);
final ShaderProgram sp = new ShaderProgram();
sp.add(rsVp);
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 2e783e974..bd0e77e9b 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
@@ -248,11 +248,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, true);
+ rsFp0.defaultShaderCustomization(gl, true, true);
+ rsFp1.defaultShaderCustomization(gl, true, true);
final ShaderProgram sp1 = new ShaderProgram();
sp1.add(rsVp0);
diff --git a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
index 989de6c7e..926d4490c 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
@@ -58,7 +58,7 @@ public class GLSLSimpleProgram {
int fragShader = gl.glCreateShader(GL2ES2.GL_FRAGMENT_SHADER);
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- String[] vlines = new String[] { vertShaderCode };
+ String[] vlines = new String[] { gl.getContext().getGLSLVersionString()+vertShaderCode };
int[] vlengths = new int[] { vlines[0].length() };
gl.glShaderSource(vertShader, vlines.length, vlines, vlengths, 0);
gl.glCompileShader(vertShader);
@@ -70,7 +70,7 @@ public class GLSLSimpleProgram {
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- String[] flines = new String[] { fragShaderCode };
+ String[] flines = new String[] { gl.getContext().getGLSLVersionString()+fragShaderCode };
int[] flengths = new int[] { flines[0].length() };
gl.glShaderSource(fragShader, flines.length, flines, flengths, 0);
gl.glCompileShader(fragShader);