diff options
Diffstat (limited to 'src/demo')
-rw-r--r-- | src/demo/GPUTextGLListenerBase01.java | 16 | ||||
-rw-r--r-- | src/demo/MSAATool.java | 14 |
2 files changed, 18 insertions, 12 deletions
diff --git a/src/demo/GPUTextGLListenerBase01.java b/src/demo/GPUTextGLListenerBase01.java index 70ddddd0d..f894f4142 100644 --- a/src/demo/GPUTextGLListenerBase01.java +++ b/src/demo/GPUTextGLListenerBase01.java @@ -54,6 +54,7 @@ public abstract class GPUTextGLListenerBase01 implements GLEventListener { KeyAction keyAction; + boolean updateFont = true; int fontSize = 40; final int fontSizeModulo = 100; @@ -65,7 +66,7 @@ public abstract class GPUTextGLListenerBase01 implements GLEventListener { float zoom = -70f; int texSize = 400; - boolean doMatrix = true; + boolean updateMatrix = true; static final String text1; static final String text2; @@ -88,7 +89,7 @@ public abstract class GPUTextGLListenerBase01 implements GLEventListener { this.ang = angle; this.zoom = zoom; this.texSize = fbosize; - doMatrix = true; + updateMatrix = true; } public void init(GLAutoDrawable drawable) { @@ -118,11 +119,11 @@ public abstract class GPUTextGLListenerBase01 implements GLEventListener { gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // Demo02 needs to have this set here as well .. hmm ? gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); - if(doMatrix) { + if(updateMatrix) { textRenderer.resetMatrix(gl); textRenderer.translate(gl, xTran, yTran, zoom); textRenderer.rotate(gl, ang, 0, 1, 0); - doMatrix = false; + updateMatrix = false; } textRenderer.renderString3D(gl, font, text2, position, fontSize, texSize); @@ -135,25 +136,26 @@ public abstract class GPUTextGLListenerBase01 implements GLEventListener { public void fontIncr(int v) { fontSize = Math.abs((fontSize + v) % fontSizeModulo) ; + updateFont = true; dumpMatrix(true); } public void zoom(int v){ zoom += v; - doMatrix = true; + updateMatrix = true; dumpMatrix(false); } public void move(float x, float y){ xTran += x; yTran += y; - doMatrix = true; + updateMatrix = true; dumpMatrix(false); } public void rotate(float delta){ ang += delta; ang %= 360.0f; - doMatrix = true; + updateMatrix = true; dumpMatrix(false); } diff --git a/src/demo/MSAATool.java b/src/demo/MSAATool.java index a31005f08..e357a3239 100644 --- a/src/demo/MSAATool.java +++ b/src/demo/MSAATool.java @@ -46,6 +46,15 @@ public class MSAATool { // default TRUE System.out.println(" GL MULTISAMPLE "+gl.glIsEnabled(GL2ES2.GL_MULTISAMPLE)); + // sample buffers min 0, same as GLX_SAMPLE_BUFFERS_ARB or WGL_SAMPLE_BUFFERS_ARB + gl.glGetIntegerv(GL2GL3.GL_SAMPLE_BUFFERS, vi, 0); + // samples min 0 + gl.glGetIntegerv(GL2GL3.GL_SAMPLES, vi, 1); + System.out.println(" GL SAMPLE_BUFFERS "+vi[0]+", SAMPLES "+vi[1]); + + System.out.println("GL CSAA SETUP:"); + // default FALSE + System.out.println(" GL SAMPLE COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE)); // default FALSE System.out.println(" GL SAMPLE_ALPHA_TO_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE)); // default FALSE @@ -56,10 +65,5 @@ public class MSAATool { System.out.println(" GL SAMPLE_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE) + ": SAMPLE_COVERAGE_VALUE "+vf[0]+ ", SAMPLE_COVERAGE_INVERT "+vb[0]); - // sample buffers min 0, same as GLX_SAMPLE_BUFFERS_ARB or WGL_SAMPLE_BUFFERS_ARB - gl.glGetIntegerv(GL2GL3.GL_SAMPLE_BUFFERS, vi, 0); - // samples min 0 - gl.glGetIntegerv(GL2GL3.GL_SAMPLES, vi, 1); - System.out.println(" GL SAMPLE_BUFFERS "+vi[0]+", SAMPLES "+vi[1]); } } |