summaryrefslogtreecommitdiffstats
path: root/src/demos/j2d
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-01-04 07:23:02 +0000
committerKenneth Russel <[email protected]>2007-01-04 07:23:02 +0000
commita4d2028b3827d9fe6041caf9cdf8e30fccdd87c2 (patch)
tree1d4d3a9362d7f0cc2e95279f998bbc1c2875d6a1 /src/demos/j2d
parent793d14340862fcafc6508a560ec398d81ca76e72 (diff)
Removed debugging code
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@197 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/j2d')
-rwxr-xr-xsrc/demos/j2d/TestTextRenderer.java70
1 files changed, 1 insertions, 69 deletions
diff --git a/src/demos/j2d/TestTextRenderer.java b/src/demos/j2d/TestTextRenderer.java
index f89b0cf..853009c 100755
--- a/src/demos/j2d/TestTextRenderer.java
+++ b/src/demos/j2d/TestTextRenderer.java
@@ -39,9 +39,6 @@
package demos.j2d;
-// Debugging only
-//import java.awt.EventQueue;
-//import java.awt.Rectangle;
import java.awt.Font;
import java.awt.Frame;
import java.awt.event.*;
@@ -61,16 +58,13 @@ import gleem.linalg.*;
with moving Java 2D-rendered text on top. */
public class TestTextRenderer implements GLEventListener {
- // private static final boolean DEBUG = false;
-
public static void main(String[] args) {
Frame frame = new Frame("Text Renderer Test");
GLCapabilities caps = new GLCapabilities();
caps.setAlphaBits(8);
GLCanvas canvas = new GLCanvas(caps);
canvas.addGLEventListener(new Gears());
- TestTextRenderer test = new TestTextRenderer();
- canvas.addGLEventListener(test);
+ canvas.addGLEventListener(new TestTextRenderer());
frame.add(canvas);
frame.setSize(512, 512);
final Animator animator = new Animator(canvas);
@@ -88,31 +82,6 @@ public class TestTextRenderer implements GLEventListener {
}
});
- /*
- if (DEBUG) {
- Frame dbgFrame = new Frame("Debug Output");
- GLCanvas dbgCanvas = new GLCanvas(caps, null, canvas.getContext(), null);
- dbgCanvas.addGLEventListener(test.new DebugListener(dbgFrame));
- dbgFrame.add(dbgCanvas);
- final FPSAnimator anim = new FPSAnimator(dbgCanvas, 10);
- dbgFrame.addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent e) {
- // Run this on another thread than the AWT event queue to
- // make sure the call to Animator.stop() completes before
- // exiting
- new Thread(new Runnable() {
- public void run() {
- anim.stop();
- }
- }).start();
- }
- });
- dbgFrame.setSize(256, 256);
- dbgFrame.setVisible(true);
- anim.start();
- }
- */
-
frame.show();
animator.start();
}
@@ -206,41 +175,4 @@ public class TestTextRenderer implements GLEventListener {
// Unused methods
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
-
- /*
- class DebugListener implements GLEventListener {
- private GLU glu = new GLU();
- private Frame frame;
-
- DebugListener(Frame frame) {
- this.frame = frame;
- }
-
- public void display(GLAutoDrawable drawable) {
- GL gl = drawable.getGL();
- gl.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT);
- if (renderer != null) {
- J2DTextureRenderer rend = renderer.getBackingStore();
- final int w = rend.getWidth();
- final int h = rend.getHeight();
- rend.beginOrthoRendering(w, h);
- rend.drawOrthoRect(0, 0);
- rend.endOrthoRendering();
- if (frame.getWidth() != w ||
- frame.getHeight() != h) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- frame.setSize(w, h);
- }
- });
- }
- }
- }
-
- // Unused methods
- public void init(GLAutoDrawable drawable) {}
- public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
- }
- */
}