diff options
author | Rami Santina <[email protected]> | 2011-03-30 15:08:03 +0300 |
---|---|---|
committer | Rami Santina <[email protected]> | 2011-03-30 15:08:03 +0300 |
commit | 81c3642d6cd98a979808c95c27e265d0cc726ed4 (patch) | |
tree | 204741633c9169b48a9e2960318c3b948972f462 /src/demo/GPUTextNewtDemo01.java | |
parent | fca85c495e24322dd8870832fe3934fbe2d40236 (diff) | |
parent | dbc74b98eb7429cbb51f7af0572ab53ddd0d9edc (diff) |
Merge chnages with sgothel
Diffstat (limited to 'src/demo/GPUTextNewtDemo01.java')
-rw-r--r-- | src/demo/GPUTextNewtDemo01.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/demo/GPUTextNewtDemo01.java b/src/demo/GPUTextNewtDemo01.java index 934eba1ba..9a3067548 100644 --- a/src/demo/GPUTextNewtDemo01.java +++ b/src/demo/GPUTextNewtDemo01.java @@ -34,6 +34,7 @@ import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLProfile; import com.jogamp.graph.curve.Region; +import com.jogamp.graph.curve.opengl.TextRenderer; import com.jogamp.graph.geom.opengl.SVertex; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.util.Animator; @@ -58,14 +59,14 @@ public class GPUTextNewtDemo01 { caps.setNumSamples(4); // 2 samples is not enough .. System.out.println("Requested: "+caps); - window = GLWindow.create(caps); - + window = GLWindow.create(caps); window.setPosition(10, 10); window.setSize(800, 400); - window.setTitle("GPU Text Newt Demo 01 - r2t0 msaa1"); + textGLListener = new TextGLListener(); - textGLListener.attachTo(window); + textGLListener.attachInputListenerTo(window); + window.addGLEventListener(textGLListener); window.enablePerfLog(true); window.setVisible(true); @@ -75,7 +76,7 @@ public class GPUTextNewtDemo01 { animator.start(); } - private class TextGLListener extends GPUTextGLListenerBase01 { + private class TextGLListener extends GPUTextRendererListenerBase01 { public TextGLListener() { super(SVertex.factory(), Region.SINGLE_PASS, DEBUG, TRACE); // FBO size unrelated with 1 pass @@ -85,10 +86,12 @@ public class GPUTextNewtDemo01 { } public void init(GLAutoDrawable drawable) { - GL2ES2 gl = drawable.getGL().getGL2ES2(); - super.init(drawable); + GL2ES2 gl = drawable.getGL().getGL2ES2(); + + final TextRenderer textRenderer = (TextRenderer) getRenderer(); + gl.setSwapInterval(1); gl.glEnable(GL2ES2.GL_DEPTH_TEST); textRenderer.init(gl); |