summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-12-30 16:17:16 +0000
committerKenneth Russel <[email protected]>2008-12-30 16:17:16 +0000
commitd8749bb11e948516a69d85a03be66cc4ef74b1d3 (patch)
treef39c3d7b49e313ff8e078445911d3f14b91c674d /src
parentdb0a8ad5863b6fad1520677d8a52c99ea88139e1 (diff)
Moved GL2- and AWT-specific utility classes into the AWT package
because the expectation is that the AWT implementation will only be used on the desktop, where the GL2 profile is always available, and renamed the classes to their JOGL 1.0 naming convention. Updated demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@308 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src')
-rwxr-xr-xsrc/demos/j2d/CustomText.java8
-rwxr-xr-xsrc/demos/j2d/FlyingText.java6
-rwxr-xr-xsrc/demos/j2d/TestOverlay.java8
-rwxr-xr-xsrc/demos/j2d/TestTextRenderer.java6
-rwxr-xr-xsrc/demos/j2d/TestTextureRenderer.java6
-rwxr-xr-xsrc/demos/j2d/TextCube.java6
-rwxr-xr-xsrc/demos/j2d/TextFlow.java6
-rwxr-xr-xsrc/demos/util/FPSCounter.java6
8 files changed, 25 insertions, 27 deletions
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java
index 1b47d84..9830468 100755
--- a/src/demos/j2d/CustomText.java
+++ b/src/demos/j2d/CustomText.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import com.sun.opengl.util.texture.Texture;
import com.sun.opengl.util.texture.TextureCoords;
import com.sun.opengl.util.texture.TextureIO;
@@ -138,7 +138,7 @@ public class CustomText extends Demo {
private List/*<TextInfo>*/ textInfo = new ArrayList/*<TextInfo>*/();
private Time time;
private Texture backgroundTexture;
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private Random random = new Random();
private GLU glu = new GLU();
private int width;
@@ -206,7 +206,7 @@ public class CustomText extends Demo {
backgroundTexture.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);
// Create the text renderer
- renderer = new GL2TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true,
+ renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true,
new CustomRenderDelegate(52, 10, Color.BLUE, Color.CYAN));
// Create the FPS counter
@@ -382,7 +382,7 @@ public class CustomText extends Demo {
private static final Color DROP_SHADOW_COLOR = new Color(0, 0, 0, 0.5f);
- class CustomRenderDelegate implements GL2TextRenderer.RenderDelegate {
+ class CustomRenderDelegate implements TextRenderer.RenderDelegate {
private float gradientSize;
private int dropShadowDepth;
private Color color1;
diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java
index 24ca1da..d076007 100755
--- a/src/demos/j2d/FlyingText.java
+++ b/src/demos/j2d/FlyingText.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import com.sun.opengl.util.texture.Texture;
import com.sun.opengl.util.texture.TextureCoords;
import com.sun.opengl.util.texture.TextureIO;
@@ -153,7 +153,7 @@ public class FlyingText extends Demo {
private int dropShadowDistance = DEFAULT_DROP_SHADOW_DIST;
private Time time;
private Texture backgroundTexture;
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private Random random = new Random();
private GLU glu = new GLU();
private int width;
@@ -247,7 +247,7 @@ public class FlyingText extends Demo {
backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
// Create the text renderer
- renderer = new GL2TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true);
+ renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true);
// Create the FPS counter
fps = new FPSCounter(drawable, 36);
diff --git a/src/demos/j2d/TestOverlay.java b/src/demos/j2d/TestOverlay.java
index 6212def..eaf4088 100755
--- a/src/demos/j2d/TestOverlay.java
+++ b/src/demos/j2d/TestOverlay.java
@@ -39,9 +39,7 @@
package demos.j2d;
-
-
-import com.sun.opengl.util.awt.gl2.GL2Overlay;
+import com.sun.opengl.util.awt.Overlay;
import demos.gears.Gears;
import demos.util.*;
import gleem.linalg.*;
@@ -94,7 +92,7 @@ public class TestOverlay implements GLEventListener {
animator.start();
}
- private GL2Overlay overlay;
+ private Overlay overlay;
private Time time;
private Font font;
private Color TRANSPARENT_BLACK = new Color(0.0f, 0.0f, 0.0f, 0.0f);
@@ -115,7 +113,7 @@ public class TestOverlay implements GLEventListener {
GL gl = drawable.getGL();
gl.setSwapInterval(0);
- overlay = new GL2Overlay(drawable);
+ overlay = new Overlay(drawable);
time = new SystemTime();
((SystemTime) time).rebase();
diff --git a/src/demos/j2d/TestTextRenderer.java b/src/demos/j2d/TestTextRenderer.java
index d05d5fb..813fec0 100755
--- a/src/demos/j2d/TestTextRenderer.java
+++ b/src/demos/j2d/TestTextRenderer.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import demos.gears.Gears;
import demos.util.FPSCounter;
import demos.util.SystemTime;
@@ -92,7 +92,7 @@ public class TestTextRenderer implements GLEventListener {
animator.start();
}
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private Time time;
private Font font;
private Vec2f velocity = new Vec2f(100.0f, 150.0f);
@@ -111,7 +111,7 @@ public class TestTextRenderer implements GLEventListener {
// Gears demo)
gl.setSwapInterval(0);
- renderer = new GL2TextRenderer(new Font("SansSerif", Font.BOLD, 36));
+ renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 36));
time = new SystemTime();
((SystemTime) time).rebase();
diff --git a/src/demos/j2d/TestTextureRenderer.java b/src/demos/j2d/TestTextureRenderer.java
index 138c4c6..438fbc1 100755
--- a/src/demos/j2d/TestTextureRenderer.java
+++ b/src/demos/j2d/TestTextureRenderer.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextureRenderer;
+import com.sun.opengl.util.awt.TextureRenderer;
import demos.gears.Gears;
import demos.util.SystemTime;
import demos.util.Time;
@@ -101,7 +101,7 @@ public class TestTextureRenderer implements GLEventListener {
animator.start();
}
- private GL2TextureRenderer renderer;
+ private TextureRenderer renderer;
private Time time;
private Font font;
private Color TRANSPARENT_BLACK = new Color(0.0f, 0.0f, 0.0f, 0.0f);
@@ -119,7 +119,7 @@ public class TestTextureRenderer implements GLEventListener {
GL gl = drawable.getGL();
gl.setSwapInterval(0);
- renderer = new GL2TextureRenderer(256, 256, true);
+ renderer = new TextureRenderer(256, 256, true);
time = new SystemTime();
((SystemTime) time).rebase();
diff --git a/src/demos/j2d/TextCube.java b/src/demos/j2d/TextCube.java
index c04b57e..6ece457 100755
--- a/src/demos/j2d/TextCube.java
+++ b/src/demos/j2d/TextCube.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import demos.common.Demo;
import demos.util.FPSCounter;
import demos.util.SystemTime;
@@ -67,7 +67,7 @@ public class TextCube extends Demo {
private float yAng;
private GLU glu = new GLU();
private Time time;
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private FPSCounter fps;
private float textScaleFactor;
@@ -102,7 +102,7 @@ public class TextCube extends Demo {
}
public void init(GLAutoDrawable drawable) {
- renderer = new GL2TextRenderer(new Font("SansSerif", Font.PLAIN, 72));
+ renderer = new TextRenderer(new Font("SansSerif", Font.PLAIN, 72));
GL gl = drawable.getGL();
gl.glEnable(GL2.GL_DEPTH_TEST);
diff --git a/src/demos/j2d/TextFlow.java b/src/demos/j2d/TextFlow.java
index 8fbbc2a..72a88ff 100755
--- a/src/demos/j2d/TextFlow.java
+++ b/src/demos/j2d/TextFlow.java
@@ -39,7 +39,7 @@
package demos.j2d;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import demos.common.Demo;
import demos.util.SystemTime;
import demos.util.Time;
@@ -106,7 +106,7 @@ public class TextFlow extends Demo {
private List/*<String>*/ lines = new ArrayList();
private Time time;
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private int curParagraph;
private float x = 30;
private float y;
@@ -143,7 +143,7 @@ public class TextFlow extends Demo {
}
public void init(GLAutoDrawable drawable) {
- renderer = new GL2TextRenderer(new Font("SansSerif", Font.PLAIN, 36), true, false);
+ renderer = new TextRenderer(new Font("SansSerif", Font.PLAIN, 36), true, false);
time = new SystemTime();
((SystemTime) time).rebase();
}
diff --git a/src/demos/util/FPSCounter.java b/src/demos/util/FPSCounter.java
index 820070e..79ea38b 100755
--- a/src/demos/util/FPSCounter.java
+++ b/src/demos/util/FPSCounter.java
@@ -39,7 +39,7 @@
package demos.util;
-import com.sun.opengl.util.awt.gl2.GL2TextRenderer;
+import com.sun.opengl.util.awt.TextRenderer;
import com.sun.opengl.util.texture.Texture;
import java.awt.Font;
import java.awt.geom.Rectangle2D;
@@ -61,7 +61,7 @@ public class FPSCounter {
private int textLocation = LOWER_RIGHT;
private GLDrawable drawable;
- private GL2TextRenderer renderer;
+ private TextRenderer renderer;
private DecimalFormat format = new DecimalFormat("####.00");
private int frameCount;
private long startTime;
@@ -108,7 +108,7 @@ public class FPSCounter {
boolean antialiased,
boolean useFractionalMetrics) throws GLException {
this.drawable = drawable;
- renderer = new GL2TextRenderer(font, antialiased, useFractionalMetrics);
+ renderer = new TextRenderer(font, antialiased, useFractionalMetrics);
}
/** Gets the relative location where the text of this FPSCounter