summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-09-26 00:27:18 +0000
committerKenneth Russel <[email protected]>2005-09-26 00:27:18 +0000
commitde6334654ef95d225670e6f7b56006d66f02729d (patch)
treefaa7365342294d7f9acfa7c60373104d48c98694
parent654615cdb56fc28b8f215cbc248479b58025e579 (diff)
Removed GLU entry points for mipmapping and scaling routines taking
primitive arrays in place of C void* arguments; now only variants are those taking Buffer, as in the rest of the API. Added new convenience routines to BufferUtils and made original copying convenience routines respect Buffer position and limits. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@137 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java
index fb691bf..63b4a59 100644
--- a/src/demos/vertexProgRefract/VertexProgRefract.java
+++ b/src/demos/vertexProgRefract/VertexProgRefract.java
@@ -535,7 +535,7 @@ public class VertexProgRefract extends Demo {
byte[] data = ((DataBufferByte) img.getRaster().getDataBuffer()).getData();
if (mipmapped) {
glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_RGB,
- GL.GL_UNSIGNED_BYTE, data);
+ GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(data));
} else {
gl.glTexImage2D(target, 0, GL.GL_RGB, img.getWidth(), img.getHeight(), 0,
GL.GL_RGB, GL.GL_UNSIGNED_BYTE, ByteBuffer.wrap(data));
@@ -547,7 +547,7 @@ public class VertexProgRefract extends Demo {
int[] data = ((DataBufferInt) img.getRaster().getDataBuffer()).getData();
if (mipmapped) {
glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_RGB,
- GL.GL_UNSIGNED_BYTE, data);
+ GL.GL_UNSIGNED_BYTE, IntBuffer.wrap(data));
} else {
gl.glTexImage2D(target, 0, GL.GL_RGB, img.getWidth(), img.getHeight(), 0,
GL.GL_RGB, GL.GL_UNSIGNED_BYTE, IntBuffer.wrap(data));