diff options
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java index 7567679d4..296a3604a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java @@ -37,6 +37,7 @@ import java.nio.FloatBuffer; import javax.media.opengl.GL; import javax.media.opengl.GL2ES2; import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLContext; import javax.media.opengl.GLEventListener; import javax.media.opengl.GLProfile; import javax.media.opengl.GLUniformData; @@ -173,6 +174,19 @@ public class GearsES2 implements GLEventListener { new com.jogamp.newt.event.awt.AWTKeyAdapter(gearsKeys).addTo(comp); } st.useProgram(gl, false); + + int[] maxVals = new int[] { -1, -1 } ; + GLContext glc = drawable.getContext(); + boolean r = glc.queryMaxSwapGroups(maxVals, 0, maxVals, 1); + System.err.println("swap group max groups "+maxVals[0]+", barriers "+maxVals[0]+", "+r); + if(maxVals[0]>0) { + System.err.println("swap group joing 1: "+glc.joinSwapGroup(1)); + if(maxVals[1]>0) { + System.err.println("swap group bind 1-1: "+glc.bindSwapBarrier(1, 1)); + } + } + glc.setSwapInterval(swapInterval); + System.err.println(Thread.currentThread()+" GearsES2.init FIN"); } @@ -181,8 +195,6 @@ public class GearsES2 implements GLEventListener { Assert.assertEquals("not init or already disposed", true, initialized); GL2ES2 gl = drawable.getGL().getGL2ES2(); - gl.setSwapInterval(swapInterval); - float h = (float)height / (float)width; st.useProgram(gl, true); |