From 6873f65775af236ed270fcbd08661f5b53ba3598 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 24 Oct 2005 19:21:28 +0000 Subject: Merged JSR-231 branch on to the main JOGL trunk. The main trunk now contains the evolving JSR-231 Reference Implementation and the JSR-231 branch is permanently closed. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@144 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/util/Bunny.java | 3 ++- src/demos/util/ObjReader.java | 4 +++- src/demos/util/SGIImage.java | 7 ++++--- src/demos/util/TGAImage.java | 9 +++++---- src/demos/util/Triceratops.java | 3 ++- 5 files changed, 16 insertions(+), 10 deletions(-) (limited to 'src/demos/util') 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 -- cgit v1.2.3