diff options
author | Sven Gothel <[email protected]> | 2011-03-25 23:15:00 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-03-25 23:15:00 +0100 |
commit | 28c3731a75da19661f4ed5d6208807d7c4d0fb5a (patch) | |
tree | ca320d33018bfc5f5f6ecf3362a6252aff12c3ef | |
parent | 0976b895fd595ca29c6854ee4cfd9c402e9d27e6 (diff) |
WindowTitle: Add r2t/msaa - Region Demos: Dump MSAA
-rwxr-xr-x | src/demo/GPURegionNewtDemo01.java | 34 | ||||
-rwxr-xr-x | src/demo/GPURegionNewtDemo02.java | 11 | ||||
-rw-r--r-- | src/demo/GPUTextNewtDemo01.java | 4 | ||||
-rw-r--r-- | src/demo/GPUTextNewtDemo02.java | 2 |
4 files changed, 26 insertions, 25 deletions
diff --git a/src/demo/GPURegionNewtDemo01.java b/src/demo/GPURegionNewtDemo01.java index 76e4bb97b..cde4df683 100755 --- a/src/demo/GPURegionNewtDemo01.java +++ b/src/demo/GPURegionNewtDemo01.java @@ -69,19 +69,18 @@ class RegionNewtWindow { } private void createWindow() { GLProfile.initSingleton(true); - GLProfile glp = GLProfile.getGL2ES2(); - GLCapabilities caps = new GLCapabilities(glp); - caps.setDoubleBuffered(true); - caps.setSampleBuffers(true); - caps.setNumSamples(4); - System.out.println(caps); - final GLWindow window = GLWindow.create(caps); - window.setPosition(10, 10); - window.setSize(500, 500); - - window.setTitle("GPU Curve Region Newt Demo 01"); - regionGLListener = new RegionGLListener(); - window.addGLEventListener(regionGLListener); + GLProfile glp = GLProfile.getGL2ES2(); + GLCapabilities caps = new GLCapabilities(glp); + caps.setAlphaBits(4); + caps.setSampleBuffers(true); + caps.setNumSamples(4); // 2 samples is not enough .. + System.out.println("Requested: " + caps); + final GLWindow window = GLWindow.create(caps); + window.setPosition(10, 10); + window.setSize(500, 500); + window.setTitle("GPU Curve Region Newt Demo 01 - r2t0 msaa1"); + regionGLListener = new RegionGLListener(); + window.addGLEventListener(regionGLListener); window.setVisible(true); @@ -174,6 +173,12 @@ class RegionNewtWindow { gl.setSwapInterval(1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); regionRenderer = new HwRegionRenderer(drawable.getContext()); + regionRenderer.setAlpha(1.0f); + regionRenderer.setColor(0.0f, 0.0f, 0.0f); + //gl.glSampleCoverage(0.95f, false); + //gl.glEnable(GL2GL3.GL_SAMPLE_COVERAGE); // sample coverage doesn't really make a difference to lines + //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE); + MSAATool.dump(drawable); createTestOutline(); } @@ -193,9 +198,6 @@ class RegionNewtWindow { regionRenderer.rotate(ang, 0, 1, 0); try { - regionRenderer.setAlpha(1.0f); - regionRenderer.setColor(0.0f, 0.0f, 1.0f); - regionRenderer.renderOutlineShape(outlineShape, new float[]{0,0,0}); } catch (Exception e) { e.printStackTrace(); diff --git a/src/demo/GPURegionNewtDemo02.java b/src/demo/GPURegionNewtDemo02.java index 6a9e98f62..7de9efa43 100755 --- a/src/demo/GPURegionNewtDemo02.java +++ b/src/demo/GPURegionNewtDemo02.java @@ -69,13 +69,12 @@ class RegionsNewtWindow { GLProfile.initSingleton(true); GLProfile glp = GLProfile.getGL2ES2(); GLCapabilities caps = new GLCapabilities(glp); - caps.setDoubleBuffered(true); - System.out.println(caps); + System.out.println("Requested: "+caps); final GLWindow window = GLWindow.create(caps); window.setPosition(10, 10); window.setSize(500, 500); - window.setTitle("GPU Curve Region Newt Demo 01"); + window.setTitle("GPU Curve Region Newt Demo 02 - r2t0 msaa0"); regionGLListener = new RegionGLListener(); window.addGLEventListener(regionGLListener); @@ -170,6 +169,9 @@ class RegionsNewtWindow { gl.setSwapInterval(1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); regionRenderer = new HwRegionRenderer(drawable.getContext()); + regionRenderer.setAlpha(1.0f); + regionRenderer.setColor(0.0f, 0.0f, 0.0f); + MSAATool.dump(drawable); createTestOutline(); } @@ -189,9 +191,6 @@ class RegionsNewtWindow { regionRenderer.rotate(ang, 0, 1, 0); try { - regionRenderer.setAlpha(1.0f); - regionRenderer.setColor(0.0f, 0.0f, 1.0f); - regionRenderer.renderOutlineShapes(outlineShapes, new float[]{0,0,0}); } catch (Exception e) { e.printStackTrace(); diff --git a/src/demo/GPUTextNewtDemo01.java b/src/demo/GPUTextNewtDemo01.java index ce6943463..25c40b433 100644 --- a/src/demo/GPUTextNewtDemo01.java +++ b/src/demo/GPUTextNewtDemo01.java @@ -78,7 +78,7 @@ class TextNewtWindow1 { window.setPosition(10, 10); window.setSize(500, 500); - window.setTitle("GPU Text Newt Demo 01"); + window.setTitle("GPU Text Newt Demo 01 - r2t0 msaa1"); textGLListener = new TextGLListener(); window.addGLEventListener(textGLListener); @@ -137,7 +137,7 @@ class TextNewtWindow1 { gl.glEnable(GL2ES2.GL_DEPTH_TEST); textRenderer = new HwTextRenderer(drawable.getContext(), pointFactory, Region.SINGLE_PASS); textRenderer.setAlpha(1.0f); - textRenderer.setColor(0.0f, 0.0f, 1.0f); + textRenderer.setColor(0.0f, 0.0f, 0.0f); //gl.glSampleCoverage(0.95f, false); //gl.glEnable(GL2GL3.GL_SAMPLE_COVERAGE); // sample coverage doesn't really make a difference to lines //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE); diff --git a/src/demo/GPUTextNewtDemo02.java b/src/demo/GPUTextNewtDemo02.java index 3867800d1..4f5e62b31 100644 --- a/src/demo/GPUTextNewtDemo02.java +++ b/src/demo/GPUTextNewtDemo02.java @@ -77,7 +77,7 @@ class TextNewtWindow { window.setPosition(10, 10); window.setSize(1000, 1000); - window.setTitle("GPU Text Newt Demo 02"); + window.setTitle("GPU Text Newt Demo 01 - r2t1 msaa0"); textGLListener = new TextGLListener(); window.addGLEventListener(textGLListener); |