summaryrefslogtreecommitdiffstats
path: root/src/demos/j2d/CustomText.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-03-26 20:00:46 +0100
committerSven Gothel <sgothel@jausoft.com>2010-03-26 20:00:46 +0100
commitd1dfb4a367b3fa2350122a9623e3f1b56210a86e (patch)
tree9d3b4bc39d8cb7ff8c9dadeb291e435d9ad6cdd0 /src/demos/j2d/CustomText.java
parent08d7de9c49d6bd778d0a915731ae9edbafdf646c (diff)
Adapted JOGL TextureData API changes (138a5b057e39a4738a2e82f370424a9a21aceea9)
Diffstat (limited to 'src/demos/j2d/CustomText.java')
-rwxr-xr-xsrc/demos/j2d/CustomText.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java
index bfcbc79..c3194be 100755
--- a/src/demos/j2d/CustomText.java
+++ b/src/demos/j2d/CustomText.java
@@ -190,6 +190,8 @@ public class CustomText extends Demo {
}
public void init(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
+
// Create the background texture
BufferedImage bgImage = new BufferedImage(2, 2, BufferedImage.TYPE_BYTE_GRAY);
Graphics2D g = bgImage.createGraphics();
@@ -199,7 +201,7 @@ public class CustomText extends Demo {
g.fillRect(0, 0, 1, 1);
g.fillRect(1, 1, 1, 1);
g.dispose();
- backgroundTexture = AWTTextureIO.newTexture(bgImage, false);
+ backgroundTexture = AWTTextureIO.newTexture(gl.getGLProfile(), bgImage, false);
backgroundTexture.bind();
backgroundTexture.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
backgroundTexture.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
@@ -231,7 +233,6 @@ public class CustomText extends Demo {
((SystemTime) time).rebase();
// Set up properties; note we don't need the depth buffer in this demo
- GL gl = drawable.getGL();
gl.glDisable(GL.GL_DEPTH_TEST);
// Turn off vsync if we can
gl.setSwapInterval(0);