From b8d551939b3d27b5c680c202f0a36836b29a5ab8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Mar 2014 17:11:37 +0100 Subject: Fix GraphUI - Remove MSAA if in VBAA mode (double AA not so good) - Adding NApplet for VBAA --- .../jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html | 4 ++-- jnlp-files/jogl-test-applets.html | 5 +++-- .../opengl/test/junit/graph/demos/GPUUISceneGLListener02.java | 9 +++++++++ .../opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java | 6 ++++-- .../opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java | 2 -- 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener02.java diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html index 66f02da6b..8e7f74430 100644 --- a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html +++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html @@ -11,7 +11,7 @@ JOGL Graph UI-Scene Demo 01

+ width="800" height="400"> NApplet
- Dual
+ VBAA
+ MSAA
+ Demonstration of GPU accelerated Text and UI rendering and interaction diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener02.java new file mode 100644 index 000000000..80225c92d --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener02.java @@ -0,0 +1,9 @@ +package com.jogamp.opengl.test.junit.graph.demos; + +import com.jogamp.graph.curve.Region; + +public class GPUUISceneGLListener02 extends GPUUISceneGLListener0A { + public GPUUISceneGLListener02() { + super(Region.VBAA_RENDERING_BIT); + } +} diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java index 1d6162233..00338e41a 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java @@ -472,6 +472,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { } else { System.err.println("GPUUISceneGLListener0A: init (0)"); } + System.err.println("Chosen: "+drawable.getChosenGLCapabilities()); cDrawable = drawable; GL2ES2 gl = drawable.getGL().getGL2ES2(); if(debug) { @@ -593,10 +594,11 @@ public class GPUUISceneGLListener0A implements GLEventListener { final String modeS = Region.getRenderModeString(renderer.getRenderModes()); final String text; if( null == actionText ) { - text = String.format("%03.1f/%03.1f fps, v-sync %d, fontSize %.1f, %s-samples %d, td %4.1f, blend %b, alpha-bits %d", + text = String.format("%03.1f/%03.1f fps, v-sync %d, fontSize %.1f, %s-samples %d, td %4.1f, blend %b, alpha-bits %d, msaa-bits %d", lfps, tfps, gl.getSwapInterval(), fontSizeFixed, modeS, sceneUIController.getSampleCount(), td, renderer.getRenderState().isHintMaskSet(RenderState.BITHINT_BLENDING_ENABLED), - drawable.getChosenGLCapabilities().getAlphaBits()); + drawable.getChosenGLCapabilities().getAlphaBits(), + drawable.getChosenGLCapabilities().getNumSamples()); } else { text = String.format("%03.1f/%03.1f fps, v-sync %d, fontSize %.1f, %s", lfps, tfps, gl.getSwapInterval(), fontSizeFixed, actionText); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java index 61d833f59..b09a73160 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java @@ -20,8 +20,6 @@ public class GPUUISceneNewtDemo02 { GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); caps.setAlphaBits(4); - caps.setSampleBuffers(true); - caps.setNumSamples(4); final GLWindow window = GLWindow.create(caps); window.setPosition(10, 10); -- cgit v1.2.3