summaryrefslogtreecommitdiffstats
path: root/src/demos/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/util')
-rw-r--r--src/demos/util/Bunny.java3
-rw-r--r--src/demos/util/ObjReader.java4
-rw-r--r--src/demos/util/SGIImage.java7
-rw-r--r--src/demos/util/TGAImage.java9
-rw-r--r--src/demos/util/Triceratops.java3
5 files changed, 16 insertions, 10 deletions
diff --git a/src/demos/util/Bunny.java b/src/demos/util/Bunny.java
index fece8da..50033b2 100644
--- a/src/demos/util/Bunny.java
+++ b/src/demos/util/Bunny.java
@@ -41,7 +41,8 @@ package demos.util;
import java.io.*;
-import net.java.games.jogl.*;
+import javax.media.opengl.*;
+import com.sun.opengl.utils.*;
/** Renders a bunny.
diff --git a/src/demos/util/ObjReader.java b/src/demos/util/ObjReader.java
index f8a6cec..1204ed5 100644
--- a/src/demos/util/ObjReader.java
+++ b/src/demos/util/ObjReader.java
@@ -43,7 +43,7 @@ import java.io.*;
import java.nio.*;
import java.util.*;
-import net.java.games.jogl.util.*;
+import com.sun.opengl.utils.*;
/** Simple parser for Wavefront .OBJ files. Does not support all file
options -- currently requires vertices and normals (only) to be
@@ -312,8 +312,10 @@ public class ObjReader {
newIndices.trim();
vertices = BufferUtils.newFloatBuffer(newVertices.size());
vertices.put(newVertices.getData());
+ vertices.rewind();
normals = BufferUtils.newFloatBuffer(newVertexNormals.size());
normals.put(newVertexNormals.getData());
+ normals.rewind();
faceIndices = newIndices;
tmpVertices = null;
tmpVertexNormals = null;
diff --git a/src/demos/util/SGIImage.java b/src/demos/util/SGIImage.java
index bf0dda9..7d4468e 100644
--- a/src/demos/util/SGIImage.java
+++ b/src/demos/util/SGIImage.java
@@ -5,7 +5,8 @@
package demos.util;
import java.io.*;
-import net.java.games.jogl.*;
+import javax.media.opengl.*;
+import com.sun.opengl.utils.*;
// Test harness
import java.awt.image.*;
@@ -131,7 +132,7 @@ public class SGIImage {
return header.ysize;
}
- /** Returns the OpenGL format for this texture; e.g. GL.GL_BGR_EXT or GL.GL_BGRA_EXT. */
+ /** Returns the OpenGL format for this texture; e.g. GL.GL_BGR or GL.GL_BGRA. */
public int getFormat() {
return format;
}
@@ -201,7 +202,7 @@ public class SGIImage {
rowSize = null;
tmpData = null;
tmpRead = null;
- format = GL.GL_BGRA_EXT;
+ format = GL.GL_BGRA;
}
private void getRow(byte[] buf, int y, int z) {
diff --git a/src/demos/util/TGAImage.java b/src/demos/util/TGAImage.java
index 24403eb..a99f4f3 100644
--- a/src/demos/util/TGAImage.java
+++ b/src/demos/util/TGAImage.java
@@ -40,7 +40,8 @@
package demos.util;
import java.io.*;
-import net.java.games.jogl.*;
+import javax.media.opengl.*;
+import com.sun.opengl.utils.*;
/**
* Targa image reader adapted from sources of the <a href =
@@ -271,10 +272,10 @@ public class TGAImage {
data = new byte[rawWidth * header.height()];
if (header.pixelDepth() == 24) {
- format = GL.GL_BGR_EXT;
+ format = GL.GL_BGR;
} else {
assert header.pixelDepth() == 32;
- format = GL.GL_BGRA_EXT;
+ format = GL.GL_BGRA;
}
for (i = 0; i < header.height(); ++i) {
@@ -295,7 +296,7 @@ public class TGAImage {
/** Returns the height of the image. */
public int getHeight() { return header.height(); }
- /** Returns the OpenGL format for this texture; e.g. GL.GL_BGR_EXT or GL.GL_BGRA_EXT. */
+ /** Returns the OpenGL format for this texture; e.g. GL.GL_BGR or GL.GL_BGRA. */
public int getGLFormat() { return format; }
/** Returns the raw data for this texture in the correct
diff --git a/src/demos/util/Triceratops.java b/src/demos/util/Triceratops.java
index e013f79..6256a0c 100644
--- a/src/demos/util/Triceratops.java
+++ b/src/demos/util/Triceratops.java
@@ -41,7 +41,8 @@ package demos.util;
import java.io.*;
-import net.java.games.jogl.*;
+import javax.media.opengl.*;
+import com.sun.opengl.utils.*;
/** Renders a triceratops. <P>