summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-05 01:44:07 +0200
committerSven Gothel <[email protected]>2011-04-05 01:44:07 +0200
commit8297ef88b927e07b41760ab3e9de05bc49fd4695 (patch)
treefa04678a48b061c6a5355623fbba4012ff5a1be5 /src/test/com/jogamp
parent2f2879256fe999c5019bd800f564e9cb2a83a0b6 (diff)
Fix: shaderProgram.program(); glBindAttribLocation() call; dispose/disposeImpl sequence;
Use shaderProgram.program() instead of shaderProgram.id() - the id() is just a unique sequence name. Call glBindAttribLocation() after program object init and before linkage. Chain call disposeImpl() properly to fix destruction sequence: TextRendererImpl01 -> TextRenderer -> GlyphString -> Region RegionRendererImpl01 -> RegionRenderer -> Region
Diffstat (limited to 'src/test/com/jogamp')
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
index cdf54796b..92b9323e2 100755
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
@@ -25,6 +25,8 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
public class TestTextRendererNEWT01 extends UITestCase {
+ static final boolean DEBUG = false;
+ static final boolean TRACE = false;
public static void main(String args[]) throws IOException {
String tstname = TestTextRendererNEWT01.class.getName();
@@ -64,7 +66,7 @@ public class TestTextRendererNEWT01 extends UITestCase {
caps.setAlphaBits(4);
GLWindow window = createWindow("text-r2t1-msaa0", caps, 800,400);
- TextGLListener textGLListener = new TextGLListener(Region.TWO_PASS);
+ TextGLListener textGLListener = new TextGLListener(Region.TWO_PASS, DEBUG, TRACE);
textGLListener.attachInputListenerTo(window);
window.addGLEventListener(textGLListener);
@@ -100,7 +102,7 @@ public class TestTextRendererNEWT01 extends UITestCase {
caps.setNumSamples(4);
GLWindow window = createWindow("text-r2t0-msaa1", caps, 800, 400);
- TextGLListener textGLListener = new TextGLListener(Region.SINGLE_PASS);
+ TextGLListener textGLListener = new TextGLListener(Region.SINGLE_PASS, DEBUG, TRACE);
textGLListener.attachInputListenerTo(window);
window.addGLEventListener(textGLListener);
@@ -130,8 +132,8 @@ public class TestTextRendererNEWT01 extends UITestCase {
private class TextGLListener extends GPUTextRendererListenerBase01 {
String winTitle;
- public TextGLListener(int type) {
- super(SVertex.factory(), type, false, false);
+ public TextGLListener(int type, boolean debug, boolean trace) {
+ super(SVertex.factory(), type, debug, trace);
}
public void attachInputListenerTo(GLWindow window) {
@@ -143,8 +145,9 @@ public class TestTextRendererNEWT01 extends UITestCase {
}
public void init(GLAutoDrawable drawable) {
+ super.init(drawable);
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
- super.init(drawable);
gl.setSwapInterval(1);
gl.glEnable(GL.GL_DEPTH_TEST);