diff options
author | Sven Gothel <[email protected]> | 2011-04-26 19:24:19 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-26 19:24:19 +0200 |
commit | f3afd3cd3be302c9b9cc3b6ec56cf032817e00a4 (patch) | |
tree | e7aaef0c1860f35f6b1e115489e134ae7df6d07c /src/demos/j2d | |
parent | a7317cf820a33cac7f068153649031483df53cac (diff) |
sync w/ jogl e007bb306124411e0232e51d16aa493cbd361f74
Diffstat (limited to 'src/demos/j2d')
-rwxr-xr-x | src/demos/j2d/CustomText.java | 16 | ||||
-rwxr-xr-x | src/demos/j2d/FlyingText.java | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java index 5918dc9..3a68761 100755 --- a/src/demos/j2d/CustomText.java +++ b/src/demos/j2d/CustomText.java @@ -210,11 +210,11 @@ public class CustomText extends Demo { g.fillRect(1, 1, 1, 1); g.dispose(); 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); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); - backgroundTexture.setTexParameteri(GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); + backgroundTexture.bind(gl); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); + backgroundTexture.setTexParameteri(gl, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); // Create the text renderer renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true, @@ -299,8 +299,8 @@ public class CustomText extends Demo { gl.glLoadIdentity(); // Draw the background texture - backgroundTexture.enable(); - backgroundTexture.bind(); + backgroundTexture.enable(gl); + backgroundTexture.bind(gl); TextureCoords coords = backgroundTexture.getImageTexCoords(); int w = drawable.getWidth(); int h = drawable.getHeight(); @@ -317,7 +317,7 @@ public class CustomText extends Demo { gl.glTexCoord2f(fw * coords.left(), fh * coords.top()); gl.glVertex3f(0, h, 0); gl.glEnd(); - backgroundTexture.disable(); + backgroundTexture.disable(gl); // Render all text renderer.beginRendering(drawable.getWidth(), drawable.getHeight()); diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java index 929803e..debb9c7 100755 --- a/src/demos/j2d/FlyingText.java +++ b/src/demos/j2d/FlyingText.java @@ -249,11 +249,11 @@ public class FlyingText extends Demo { g.fillRect(1, 1, 1, 1); g.dispose(); backgroundTexture = AWTTextureIO.newTexture(gl.getGLProfile(), bgImage, false); - backgroundTexture.bind(); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); - backgroundTexture.setTexParameteri(GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); + backgroundTexture.bind(gl); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); + backgroundTexture.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT); // Create the text renderer renderer = new TextRenderer(new Font("Serif", Font.PLAIN, 72), true, true); @@ -353,8 +353,8 @@ public class FlyingText extends Demo { gl.glLoadIdentity(); // Draw the background texture - backgroundTexture.enable(); - backgroundTexture.bind(); + backgroundTexture.enable(gl); + backgroundTexture.bind(gl); TextureCoords coords = backgroundTexture.getImageTexCoords(); int w = drawable.getWidth(); int h = drawable.getHeight(); @@ -371,7 +371,7 @@ public class FlyingText extends Demo { gl.glTexCoord2f(fw * coords.left(), fh * coords.top()); gl.glVertex3f(0, h, 0); gl.glEnd(); - backgroundTexture.disable(); + backgroundTexture.disable(gl); // Render all text renderer.beginRendering(drawable.getWidth(), drawable.getHeight()); |