summaryrefslogtreecommitdiffstats
path: root/src/demos/texture
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-26 19:24:19 +0200
committerSven Gothel <[email protected]>2011-04-26 19:24:19 +0200
commitf3afd3cd3be302c9b9cc3b6ec56cf032817e00a4 (patch)
treee7aaef0c1860f35f6b1e115489e134ae7df6d07c /src/demos/texture
parenta7317cf820a33cac7f068153649031483df53cac (diff)
sync w/ jogl e007bb306124411e0232e51d16aa493cbd361f74
Diffstat (limited to 'src/demos/texture')
-rwxr-xr-xsrc/demos/texture/TestSubImage.java10
-rwxr-xr-xsrc/demos/texture/TestTexture.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/demos/texture/TestSubImage.java b/src/demos/texture/TestSubImage.java
index 377a910..05cbb59 100755
--- a/src/demos/texture/TestSubImage.java
+++ b/src/demos/texture/TestSubImage.java
@@ -120,7 +120,7 @@ public class TestSubImage {
if (convertedImage == null) {
// Get rid of any previously allocated texture
if (texture != null) {
- texture.dispose();
+ texture.destroy(gl);
texture = null;
}
@@ -183,15 +183,15 @@ public class TestSubImage {
yOrigin = texture.getHeight() - yOrigin;
}
- texture.updateSubImage(textureData, 0,
+ texture.updateSubImage(gl, textureData, 0,
union.x, yOrigin,
union.x, yOrigin,
union.width, union.height);
}
// Now draw one quad with the texture
- texture.enable();
- texture.bind();
+ texture.enable(gl);
+ texture.bind(gl);
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE);
TextureCoords coords = texture.getImageTexCoords();
gl.glBegin(GL2.GL_QUADS);
@@ -204,7 +204,7 @@ public class TestSubImage {
gl.glTexCoord2f(coords.left(), coords.top());
gl.glVertex3f(0, 1, 0);
gl.glEnd();
- texture.disable();
+ texture.disable(gl);
}
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
diff --git a/src/demos/texture/TestTexture.java b/src/demos/texture/TestTexture.java
index 057e957..224c247 100755
--- a/src/demos/texture/TestTexture.java
+++ b/src/demos/texture/TestTexture.java
@@ -184,7 +184,7 @@ public class TestTexture implements GLEventListener {
if (flushTexture) {
flushTexture = false;
if (texture != null) {
- texture.dispose();
+ texture.destroy(gl);
texture = null;
}
}
@@ -193,7 +193,7 @@ public class TestTexture implements GLEventListener {
newTexture = false;
if (texture != null) {
- texture.dispose();
+ texture.destroy(gl);
texture = null;
}
@@ -214,8 +214,8 @@ public class TestTexture implements GLEventListener {
}
if (texture != null) {
- texture.enable();
- texture.bind();
+ texture.enable(gl);
+ texture.bind(gl);
gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
TextureCoords coords = texture.getImageTexCoords();
@@ -229,7 +229,7 @@ public class TestTexture implements GLEventListener {
gl.glTexCoord2f(coords.left(), coords.top());
gl.glVertex3f(0, 1, 0);
gl.glEnd();
- texture.disable();
+ texture.disable(gl);
}
}