summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java2
-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.vp9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp9
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java29
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java33
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java18
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java10
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java4
26 files changed, 105 insertions, 74 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
index 10c4bce42..0793d113e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
@@ -120,7 +120,7 @@ public class TestSharedContextListAWT extends UITestCase {
GLCanvas glc2 = runTestGL(f2, animator, width, 0, true);
GLCanvas glc3 = runTestGL(f3, animator, 0, height, false);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
Thread.sleep(100);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
index cc565a7d0..0662ed72e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
@@ -108,7 +108,7 @@ public class TestSharedContextListNEWT extends UITestCase {
GLWindow f1 = runTestGL(animator, 0, 0, true);
GLWindow f2 = runTestGL(animator, width, 0, true);
GLWindow f3 = runTestGL(animator, 0, height, false);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
Thread.sleep(100);
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 a41960ab8..a4b9828e0 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
@@ -1,5 +1,14 @@
// Copyright 2010 JogAmp Community. All rights reserved.
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+ #version 100
+#else
+ #version 110
+#endif
+ */
+
#ifdef GL_ES
#define MEDIUMP mediump
#define HIGHP highp
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 a785b086c..305f5c2c2 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
@@ -1,5 +1,14 @@
// Copyright 2010 JogAmp Community. All rights reserved.
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+ #version 100
+#else
+ #version 110
+#endif
+ */
+
#ifdef GL_ES
#define MEDIUMP mediump
#define HIGHP highp
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 7c8bd56f1..081094067 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
@@ -1,5 +1,14 @@
// Copyright 2010 JogAmp Community. All rights reserved.
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+ #version 100
+#else
+ #version 110
+#endif
+ */
+
#ifdef GL_ES
#define MEDIUMP mediump
#define HIGHP highp
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
index c8a89cb9b..77a19cb17 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
@@ -81,7 +81,7 @@ public class TestGearsAWT extends UITestCase {
new AWTWindowAdapter(new TraceWindowAdapter(quitAdapter)).addTo(frame);
frame.setVisible(true);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
index 900a1d116..6965fc4c0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
@@ -84,7 +84,7 @@ public class TestGearsGLJPanelAWT extends UITestCase {
_frame.setVisible(true);
} } ) ;
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
Assert.assertEquals(true, animator.isAnimating());
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
index 07c9a89bb..3abb27289 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
@@ -114,7 +114,7 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
_frame.setVisible(true);
} } ) ;
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
Assert.assertEquals(true, animator.isAnimating());
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
index a3f144c06..536f5ef39 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
@@ -100,7 +100,7 @@ public class TestGearsNEWT extends UITestCase {
glWindow.setSize(width, height);
glWindow.setVisible(true);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
index 9ed324b32..03a2f0f6a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
@@ -81,7 +81,7 @@ public class TestGearsNewtAWTWrapper extends UITestCase {
glWindow.setSize(width, height);
glWindow.setVisible(true);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
index 73e9c63cb..0656b6338 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
@@ -64,8 +64,17 @@ public class GLSLMiscHelper {
return window;
}
- public static void validateGLArrayDataServerState(GL2ES2 gl, GLArrayDataServer data) {
+ public static void validateGLArrayDataServerState(GL2ES2 gl, ShaderState st, GLArrayDataServer data) {
int[] qi = new int[1];
+ if(null != st) {
+ Assert.assertEquals(data, st.getAttribute(data.getName()));
+ if(st.shaderProgram().linked()) {
+ Assert.assertEquals(data.getLocation(), st.getAttribLocation(data.getName()));
+ Assert.assertEquals(data.getLocation(), st.glGetAttribLocation(gl, data));
+ Assert.assertEquals(data.getLocation(), st.glGetAttribLocation(gl, data.getName()));
+ Assert.assertEquals(data.getLocation(), gl.glGetAttribLocation(st.shaderProgram().program(), data.getName()));
+ }
+ }
gl.glGetVertexAttribiv(data.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_ENABLED, qi, 0);
Assert.assertEquals(data.enabled()?GL.GL_TRUE:GL.GL_FALSE, qi[0]);
gl.glGetVertexAttribiv(data.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, qi, 0);
@@ -80,7 +89,7 @@ public class GLSLMiscHelper {
}
}
- public static void displayVCArrays(GLWindow window, GL2ES2 gl, boolean preEnable, GLArrayDataServer vertices, GLArrayDataServer colors, boolean postDisable, int num, long postDelay) throws InterruptedException {
+ public static void displayVCArrays(GLWindow window, GL2ES2 gl, ShaderState st, boolean preEnable, GLArrayDataServer vertices, GLArrayDataServer colors, boolean postDisable, int num, long postDelay) throws InterruptedException {
System.err.println("screen #"+num);
if(preEnable) {
vertices.enableBuffer(gl, true);
@@ -95,8 +104,8 @@ public class GLSLMiscHelper {
Assert.assertTrue(vertices.enabled());
Assert.assertTrue(colors.enabled());
- validateGLArrayDataServerState(gl, vertices);
- validateGLArrayDataServerState(gl, colors);
+ validateGLArrayDataServerState(gl, st, vertices);
+ validateGLArrayDataServerState(gl, st, colors);
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
@@ -144,9 +153,8 @@ public class GLSLMiscHelper {
Assert.assertTrue(vertices0.sealed());
Assert.assertEquals(4, vertices0.getElementNumber());
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- Assert.assertEquals(vertices0, st.getAttribute("mgl_Vertex"));
Assert.assertEquals(vertices0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
- validateGLArrayDataServerState(gl, vertices0);
+ validateGLArrayDataServerState(gl, st, vertices0);
return vertices0;
}
@@ -165,9 +173,8 @@ public class GLSLMiscHelper {
Assert.assertTrue(vertices1.sealed());
Assert.assertEquals(4, vertices1.getElementNumber());
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- Assert.assertEquals(vertices1, st.getAttribute("mgl_Vertex"));
Assert.assertEquals(vertices1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
- validateGLArrayDataServerState(gl, vertices1);
+ validateGLArrayDataServerState(gl, st, vertices1);
return vertices1;
}
@@ -186,9 +193,8 @@ public class GLSLMiscHelper {
Assert.assertTrue(colors0.isVBOWritten());
Assert.assertTrue(colors0.sealed());
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- Assert.assertEquals(colors0, st.getAttribute("mgl_Color"));
Assert.assertEquals(colors0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
- validateGLArrayDataServerState(gl, colors0);
+ validateGLArrayDataServerState(gl, st, colors0);
return colors0;
}
@@ -205,9 +211,8 @@ public class GLSLMiscHelper {
Assert.assertTrue(colors1.isVBOWritten());
Assert.assertTrue(colors1.sealed());
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
- Assert.assertEquals(colors1, st.getAttribute("mgl_Color"));
Assert.assertEquals(colors1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
- validateGLArrayDataServerState(gl, colors1);
+ validateGLArrayDataServerState(gl, st, colors1);
return colors1;
}
}
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 126e10f06..ea5680d42 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
@@ -53,8 +53,8 @@ import org.junit.Test;
public class TestGLSLShaderState01NEWT extends UITestCase {
static long durationPerTest = 10; // ms
- static final int vertices0_loc = 1;
- static final int colors0_loc = 2;
+ static final int vertices0_loc = 0; // FIXME: AMD needs this to be location 0 ? hu ?
+ static final int colors0_loc = 1;
@Test
public void testShaderState01Validation() throws InterruptedException {
@@ -75,12 +75,11 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
"shader", "shader/bin", "RedSquareShader");
ShaderProgram sp = new ShaderProgram();
- sp.add(rsVp);
- sp.add(rsFp);
- Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+ Assert.assertTrue(0>sp.program());
+
+ sp.add(gl, rsVp, System.err);
+ sp.add(gl, rsFp, System.err);
- Assert.assertTrue(0>sp.program());
- sp.init(gl);
Assert.assertTrue(0<=sp.program());
Assert.assertTrue(!sp.inUse());
Assert.assertTrue(!sp.linked());
@@ -105,12 +104,10 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
Assert.assertEquals(vertices0_loc, vertices0.getLocation());
- Assert.assertEquals(vertices0_loc, st.glGetAttribLocation(gl, vertices0.getName()));
- Assert.assertEquals(vertices0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), vertices0.getName()));
+ GLSLMiscHelper.validateGLArrayDataServerState(gl, st, vertices0);
Assert.assertEquals(colors0_loc, colors0.getLocation());
- Assert.assertEquals(colors0_loc, st.glGetAttribLocation(gl, colors0.getName()));
- Assert.assertEquals(colors0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), colors0.getName()));
+ GLSLMiscHelper.validateGLArrayDataServerState(gl, st, colors0);
Assert.assertEquals(null, ShaderState.getShaderState(gl));
st.glUseProgram(gl, true);
@@ -131,11 +128,13 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
GLArrayDataServer vertices1 = GLSLMiscHelper.createRSVertices1(gl, st);
System.err.println("vertices1: " + vertices1);
vertices1.enableBuffer(gl, false);
+ GLSLMiscHelper.validateGLArrayDataServerState(gl, st, vertices1);
// Allocate Color Array1
GLArrayDataServer colors1 = GLSLMiscHelper.createRSColors1(gl, st);
System.err.println("colors1: " + colors1);
colors1.enableBuffer(gl, false);
+ GLSLMiscHelper.validateGLArrayDataServerState(gl, st, colors1);
// misc GL setup
gl.glClearColor(0, 0, 0, 1);
@@ -153,13 +152,13 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
// display #1 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 1, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 1, durationPerTest);
// display #2 #1 vertices1 / colors1 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices1, colors1, true, 2, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices1, colors1, true, 2, durationPerTest);
// display #3 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 3, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 3, durationPerTest);
// cleanup
vertices1.destroy(gl);
@@ -238,7 +237,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
int frames;
// validation ..
- GLSLMiscHelper.displayVCArrays(window, gl, toggleEnable, vertices0, colors0, toggleEnable, 1, 0);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, toggleEnable, vertices0, colors0, toggleEnable, 1, 0);
// warmup ..
for(frames=0; frames<GLSLMiscHelper.frames_warmup; frames++) {
@@ -327,8 +326,8 @@ public class TestGLSLShaderState01NEWT extends UITestCase {
st.glUniform(gl, pmvMatrixUniform);
// validation ..
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 1, 0);
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices1, colors1, true, 2, 0);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 1, 0);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices1, colors1, true, 2, 0);
long t0 = System.currentTimeMillis();
int frames;
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 57fc9a885..7af31fdfd 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
@@ -53,7 +53,7 @@ import org.junit.Test;
public class TestGLSLShaderState02NEWT extends UITestCase {
static long durationPerTest = 10; // ms
- static final int vertices0_loc = 1;
+ static final int vertices0_loc = 0; // FIXME: AMD needs this to be location 0 ? hu ?
static final int colors0_loc = 2;
@Test
@@ -169,13 +169,13 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
// display #1 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 1, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 1, durationPerTest);
// display #2 #1 vertices1 / colors1 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices1, colors1, true, 2, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices1, colors1, true, 2, durationPerTest);
// display #3 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 3, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 3, durationPerTest);
// SP1
// both are currently not attached to ShaderState, hence we have to reset their location as well
@@ -185,13 +185,13 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
st.attachShaderProgram(gl, sp1);
// display #1 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 10, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 10, durationPerTest);
// display #2 #1 vertices1 / colors1 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices1, colors1, true, 20, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices1, colors1, true, 20, durationPerTest);
// display #3 vertices0 / colors0 (post-disable)
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 30, durationPerTest);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 30, durationPerTest);
// cleanup
vertices1.destroy(gl);
@@ -277,8 +277,8 @@ public class TestGLSLShaderState02NEWT extends UITestCase {
st.glUniform(gl, pmvMatrixUniform);
// validation ..
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices0, colors0, true, 1, 0);
- GLSLMiscHelper.displayVCArrays(window, gl, true, vertices1, colors1, true, 2, 0);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices0, colors0, true, 1, 0);
+ GLSLMiscHelper.displayVCArrays(window, gl, st, true, vertices1, colors1, true, 2, 0);
long t0 = System.currentTimeMillis();
int frames;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
index 778f758b0..086c0d111 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
@@ -118,7 +118,7 @@ public class TestGLSLSimple01NEWT extends UITestCase {
window.addGLEventListener(new RedSquare0());
Animator animator = new Animator(window);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
Assert.assertEquals(true, animator.isAnimating());
while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
index 5a3c1ef0c..1bbf37159 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
@@ -136,7 +136,7 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
Animator animator = new Animator(glCanvas);
frame.setVisible(true);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
index 2972e30ca..8905a7637 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
@@ -83,7 +83,7 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
} else {
glWindow = GLWindow.create(caps);
}
- glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow.setUpdateFPSFrames(1, System.err);
GLEventListener demo = new Gears();
setDemoFields(demo, glWindow);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
index a441938a4..bd8ece22d 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
@@ -76,7 +76,7 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
// Create native windowing resources .. X11/Win/OSX
//
GLWindow glWindow = GLWindow.create(caps);
- glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow.setUpdateFPSFrames(1, System.err);
GLEventListener demo = new Gears();
setDemoFields(demo, glWindow);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
index 0134ea43a..661cdc517 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
@@ -71,7 +71,7 @@ public class TestGLWindows00NEWT extends UITestCase {
glWindow = GLWindow.create(caps);
Assert.assertNotNull(glWindow);
}
- glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow.setUpdateFPSFrames(1, System.err);
GLEventListener demo = new Gears();
glWindow.addGLEventListener(demo);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
index 336c0fbba..6cf1b2223 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
@@ -74,7 +74,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
} else {
glWindow = GLWindow.create(caps);
}
- glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow.setUpdateFPSFrames(1, System.err);
Assert.assertNotNull(glWindow);
glWindow.setUndecorated(onscreen && undecorated);
@@ -119,7 +119,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Assert.assertNotNull(caps);
GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
Animator animator = new Animator(window);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
Assert.assertTrue(animator.start());
while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
Thread.sleep(100);
@@ -135,7 +135,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
Assert.assertNotNull(caps);
GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
Animator animator = new Animator(window);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
Assert.assertTrue(animator.start());
while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
Thread.sleep(100);
@@ -165,7 +165,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
window2.setPosition(screen.getWidth()-width, 0);
Animator animator = new Animator();
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
Assert.assertEquals(false, animator.isStarted());
Assert.assertEquals(false, animator.isAnimating());
Assert.assertEquals(false, animator.isPaused());
@@ -227,7 +227,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
window2.setPosition(screen2.getWidth()-width, 0);
Animator animator = new Animator();
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
Assert.assertEquals(false, animator.isStarted());
Assert.assertEquals(false, animator.isAnimating());
Assert.assertEquals(false, animator.isPaused());
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
index 41f0563ac..3eac407d2 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
@@ -109,7 +109,7 @@ public class TestListenerCom01AWT extends UITestCase {
frame.setVisible(true);
Animator animator1 = new Animator(glWindow);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
Thread.sleep(100);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
index 57e69afc8..da4a0b2d4 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
@@ -137,7 +137,7 @@ public class TestRemoteGLWindows01NEWT extends UITestCase {
Assert.assertEquals(true,window2.isVisible());
animator.add(window2);
- animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator.setUpdateFPSFrames(1, System.err);
animator.start();
while(animator.getTotalFPSDuration()<durationPerTest) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
index d1c82ba34..2f97e1318 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
@@ -150,13 +150,13 @@ public class TestParenting01NEWT extends UITestCase {
glWindow1.resetFPSCounter();
glWindow2.resetFPSCounter();
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
Assert.assertEquals(true, animator1.isAnimating());
Assert.assertEquals(false, animator1.isPaused());
Assert.assertNotNull(animator1.getThread());
Animator animator2 = new Animator(glWindow2);
- animator2.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator2.setUpdateFPSFrames(1, System.err);
animator2.start();
Assert.assertEquals(true, animator2.isAnimating());
Assert.assertEquals(false, animator2.isPaused());
@@ -374,10 +374,10 @@ public class TestParenting01NEWT extends UITestCase {
Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
Animator animator2 = new Animator(glWindow2);
- animator2.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator2.setUpdateFPSFrames(1, System.err);
animator2.start();
int state = 0;
@@ -573,10 +573,10 @@ public class TestParenting01NEWT extends UITestCase {
Assert.assertEquals(1,Display.getActiveDisplayNumber());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
Animator animator2 = new Animator(glWindow2);
- animator2.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator2.setUpdateFPSFrames(1, System.err);
animator2.start();
int state = 0;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
index 3046eb061..b737cf709 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
@@ -123,7 +123,7 @@ public class TestParenting01aAWT extends UITestCase {
Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
Thread.sleep(100);
@@ -181,7 +181,7 @@ public class TestParenting01aAWT extends UITestCase {
Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
Thread.sleep(100);
@@ -217,7 +217,7 @@ public class TestParenting01aAWT extends UITestCase {
frame.add(newtCanvasAWT);
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
Assert.assertEquals(true, animator1.isStarted());
Assert.assertEquals(true, animator1.isAnimating());
@@ -254,7 +254,7 @@ public class TestParenting01aAWT extends UITestCase {
Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
int state = 0;
@@ -310,7 +310,7 @@ public class TestParenting01aAWT extends UITestCase {
Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
int state = 0;
@@ -377,7 +377,7 @@ public class TestParenting01aAWT extends UITestCase {
Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
int state = 0;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
index 80b7647ae..f44f8a7f9 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
@@ -83,7 +83,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
setDemoFields(demo1, glWindow1, false);
glWindow1.addGLEventListener(demo1);
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
final GLWindow _glWindow1 = glWindow1;
@@ -194,7 +194,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
setDemoFields(demo1, glWindow1, false);
glWindow1.addGLEventListener(demo1);
Animator animator1 = new Animator(glWindow1);
- animator1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ animator1.setUpdateFPSFrames(1, System.err);
animator1.start();
final GLWindow _glWindow1 = glWindow1;
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
index adfdc68f7..9ff02346b 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
@@ -75,7 +75,7 @@ public class TestParenting03AWT extends UITestCase {
public void testWindowParenting1AWTOneNewtChild() throws InterruptedException, InvocationTargetException {
GLWindow glWindow1 = GLWindow.create(glCaps);
- glWindow1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow1.setUpdateFPSFrames(1, System.err);
glWindow1.setUndecorated(true);
NewtCanvasAWT newtCanvasAWT1 = new NewtCanvasAWT(glWindow1);
newtCanvasAWT1.setPreferredSize(size);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
index 9aec5d80d..69af936ab 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
@@ -73,7 +73,7 @@ public class TestParenting03bAWT extends UITestCase {
public void testWindowParenting1AWTTwoNewtChilds() throws InterruptedException, InvocationTargetException {
GLWindow glWindow1 = GLWindow.create(glCaps);
- glWindow1.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow1.setUpdateFPSFrames(1, System.err);
glWindow1.setUndecorated(true);
NewtCanvasAWT newtCanvasAWT1 = new NewtCanvasAWT(glWindow1);
newtCanvasAWT1.setPreferredSize(size);
@@ -104,7 +104,7 @@ public class TestParenting03bAWT extends UITestCase {
animator1.start();
GLWindow glWindow2 = GLWindow.create(glCaps);
- glWindow2.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+ glWindow2.setUpdateFPSFrames(1, System.err);
glWindow2.setUndecorated(true);
NewtCanvasAWT newtCanvasAWT2 = new NewtCanvasAWT(glWindow2);
newtCanvasAWT2.setPreferredSize(size);