diff options
author | Kenneth Russel <[email protected]> | 2006-01-13 07:29:40 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-13 07:29:40 +0000 |
commit | 4da1dead29db175817053837d7a685f10c3212b4 (patch) | |
tree | 44e33aa492c443b0ccbfef17a9795ca269a66291 /src/demos | |
parent | a30f6883a5a4bfb3bebd1e34697377ef56dd9241 (diff) |
Renamed com.sun.opengl.utils to com.sun.opengl.util. Moved
TextureIO-related classes to com.sun.opengl.util.texture and
TextureProvider, TextureWriter and format-specific readers to
com.sun.opengl.util.texture.spi. Renamed BufferUtils to BufferUtil.
Added ImageUtil and FileUtil. Cleaned up javadoc. Updated demos.
Cleaned up some imports.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@165 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos')
36 files changed, 51 insertions, 70 deletions
diff --git a/src/demos/applets/GearsApplet.java b/src/demos/applets/GearsApplet.java index a71c9a7..15ea9c7 100755 --- a/src/demos/applets/GearsApplet.java +++ b/src/demos/applets/GearsApplet.java @@ -5,7 +5,7 @@ import java.awt.*; import java.io.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.gears.Gears; /** Shows how to deploy an applet using JOGL. This demo must be diff --git a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java index 1f165c8..f85e26c 100644 --- a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java +++ b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java @@ -36,7 +36,6 @@ package demos.cg.runtime_ogl; import com.sun.opengl.cg.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; import java.awt.*; import java.awt.event.*; @@ -274,22 +273,17 @@ public class cgGL_vertex_example implements GLEventListener frame.add(canvas); frame.setSize(500, 500); - final Animator animator = new Animator(canvas); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { // Run this on another thread than the AWT event queue to - // make sure the call to Animator.stop() completes before - // exiting + // avoid deadlocks on shutdown on some platforms new Thread(new Runnable() { public void run() { - animator.stop(); System.exit(0); } }).start(); } }); frame.show(); - animator.start(); } - } diff --git a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java index 8e8d789..afafd6f 100644 --- a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java +++ b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java @@ -36,8 +36,8 @@ package demos.cg.runtime_ogl_vertex_fragment; import com.sun.opengl.cg.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.*; import java.awt.*; import java.awt.event.*; @@ -329,9 +329,9 @@ public class runtime_ogl_vertex_fragment implements GLEventListener if (P == null) { int u, v; - P = BufferUtils.newFloatBuffer(3*nVerts); - N = BufferUtils.newFloatBuffer(3*nVerts); - uv = BufferUtils.newFloatBuffer(2*nVerts); + P = BufferUtil.newFloatBuffer(3*nVerts); + N = BufferUtil.newFloatBuffer(3*nVerts); + uv = BufferUtil.newFloatBuffer(2*nVerts); // Fill in the position, normal, and texture coordinate arrays. // Just loop over all of the vertices, compute their parametreic @@ -354,7 +354,7 @@ public class runtime_ogl_vertex_fragment implements GLEventListener } // Now fill in the vertex index arrays - indices = BufferUtils.newIntBuffer(3*nTris); + indices = BufferUtil.newIntBuffer(3*nTris); int ip = 0; for (v = 0; v < nv-1; ++v) { for (u = 0; u < nu-1; ++u) { diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java index 6c43f42..ae7865f 100755 --- a/src/demos/context/DualContext.java +++ b/src/demos/context/DualContext.java @@ -45,7 +45,7 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; /** This demo illustrates the use of the GLDrawable and GLContext APIs to create two OpenGL contexts for the same Canvas. The red and diff --git a/src/demos/fullscreen/FullscreenWorkaround.java b/src/demos/fullscreen/FullscreenWorkaround.java index 4327346..39c689c 100755 --- a/src/demos/fullscreen/FullscreenWorkaround.java +++ b/src/demos/fullscreen/FullscreenWorkaround.java @@ -43,7 +43,6 @@ import java.awt.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; /** Class which implements workaround for full-screen bugs on Windows when <code>-Dsun.java2d.noddraw=true</code> is specified as well diff --git a/src/demos/fullscreen/GearsFullscreen.java b/src/demos/fullscreen/GearsFullscreen.java index 3293250..f71dd77 100755 --- a/src/demos/fullscreen/GearsFullscreen.java +++ b/src/demos/fullscreen/GearsFullscreen.java @@ -4,7 +4,7 @@ import java.awt.*; import java.awt.event.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.gears.Gears; import demos.util.*; diff --git a/src/demos/fullscreen/GearsFullscreen2.java b/src/demos/fullscreen/GearsFullscreen2.java index 902b3bc..eea7869 100755 --- a/src/demos/fullscreen/GearsFullscreen2.java +++ b/src/demos/fullscreen/GearsFullscreen2.java @@ -5,7 +5,7 @@ import java.awt.event.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.gears.Gears; import demos.util.*; diff --git a/src/demos/fullscreen/JGearsFullscreen.java b/src/demos/fullscreen/JGearsFullscreen.java index 68a0bce..465c566 100755 --- a/src/demos/fullscreen/JGearsFullscreen.java +++ b/src/demos/fullscreen/JGearsFullscreen.java @@ -5,7 +5,7 @@ import java.awt.event.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.jgears.JGears; import demos.util.*; diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java index 666cb64..c585527 100644 --- a/src/demos/gears/Gears.java +++ b/src/demos/gears/Gears.java @@ -4,7 +4,7 @@ import java.awt.*; import java.awt.event.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; /** * Gears.java <BR> diff --git a/src/demos/hdr/ARBFPPipeline.java b/src/demos/hdr/ARBFPPipeline.java index 4501db3..ca33ddb 100755 --- a/src/demos/hdr/ARBFPPipeline.java +++ b/src/demos/hdr/ARBFPPipeline.java @@ -4,7 +4,6 @@ import java.io.*; import java.util.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; import demos.util.*; public class ARBFPPipeline implements Pipeline { diff --git a/src/demos/hdr/CgPipeline.java b/src/demos/hdr/CgPipeline.java index 9a2bd0b..4bc472b 100755 --- a/src/demos/hdr/CgPipeline.java +++ b/src/demos/hdr/CgPipeline.java @@ -4,7 +4,6 @@ import java.io.*; import java.util.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; import com.sun.opengl.cg.*; import demos.util.*; diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java index a97b500..ea0fbfc 100755 --- a/src/demos/hdr/HDR.java +++ b/src/demos/hdr/HDR.java @@ -9,7 +9,7 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; import gleem.*; diff --git a/src/demos/hdr/HDRTexture.java b/src/demos/hdr/HDRTexture.java index b2fa935..bf6bb71 100755 --- a/src/demos/hdr/HDRTexture.java +++ b/src/demos/hdr/HDRTexture.java @@ -4,7 +4,6 @@ import java.io.*; import java.nio.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; public class HDRTexture { private RGBE.Header header; diff --git a/src/demos/hdr/Pipeline.java b/src/demos/hdr/Pipeline.java index f79b28d..91faff4 100755 --- a/src/demos/hdr/Pipeline.java +++ b/src/demos/hdr/Pipeline.java @@ -4,7 +4,6 @@ import java.io.*; import java.util.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; import com.sun.opengl.cg.*; import demos.util.*; diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index 02e3c5c..fed51e8 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -44,7 +44,8 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.texture.*; import demos.common.*; import demos.util.*; import gleem.*; diff --git a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java index 5f4ce75..364fc0e 100644 --- a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java +++ b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java @@ -44,7 +44,7 @@ import javax.imageio.stream.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; import gleem.*; diff --git a/src/demos/jgears/JGears.java b/src/demos/jgears/JGears.java index 34a6ee5..9da0f46 100644 --- a/src/demos/jgears/JGears.java +++ b/src/demos/jgears/JGears.java @@ -10,7 +10,7 @@ import javax.imageio.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.gears.Gears; /** diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java index 01fe9f7..0a06f13 100755 --- a/src/demos/jrefract/JRefract.java +++ b/src/demos/jrefract/JRefract.java @@ -40,8 +40,8 @@ import javax.swing.*; import javax.swing.event.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.hdr.HDR; import demos.hwShadowmapsSimple.HWShadowmapsSimple; diff --git a/src/demos/multisample/Multisample.java b/src/demos/multisample/Multisample.java index ed6ef62..4db572a 100755 --- a/src/demos/multisample/Multisample.java +++ b/src/demos/multisample/Multisample.java @@ -42,12 +42,9 @@ package demos.multisample; import java.awt.*; import java.awt.event.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; public class Multisample { private GLCanvas canvas; - private Animator animator; - private volatile boolean quit; // Simple class to warn if results are not going to be as expected static class MultisampleChooser extends DefaultGLCapabilitiesChooser { @@ -165,7 +162,6 @@ public class Multisample { } private void runExit() { - quit = true; // Note: calling System.exit() synchronously inside the draw, // reshape or init callbacks can lead to deadlocks on certain // platforms (in particular, X11) because the JAWT's locking diff --git a/src/demos/printext/PrintExt.java b/src/demos/printext/PrintExt.java index d73981a..fa76031 100755 --- a/src/demos/printext/PrintExt.java +++ b/src/demos/printext/PrintExt.java @@ -7,7 +7,6 @@ package demos.printext; import java.awt.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; public class PrintExt { public static void main(String[] args) { diff --git a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java index 6a7d116..e20d811 100644 --- a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java +++ b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java @@ -38,7 +38,7 @@ import java.awt.event.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; import gleem.*; diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java index 2fd0f0b..50be158 100644 --- a/src/demos/proceduralTexturePhysics/Water.java +++ b/src/demos/proceduralTexturePhysics/Water.java @@ -43,7 +43,8 @@ import java.util.*; import gleem.linalg.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.texture.*; import demos.util.*; /** @@ -479,7 +480,7 @@ public class Water { try { initialMapData = TextureIO.newTextureData(getClass().getClassLoader().getResourceAsStream(initialMapFilename), false, - TextureIO.getFileSuffix(initialMapFilename)); + FileUtil.getFileSuffix(initialMapFilename)); } catch (IOException e) { throw new GLException(e); } @@ -1020,9 +1021,9 @@ public class Water { initialMapTex = TextureIO.newTexture(initialMapData); spinTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(spinFilename), false, - TextureIO.getFileSuffix(spinFilename)); + FileUtil.getFileSuffix(spinFilename)); dropletTex = TextureIO.newTexture(getClass().getClassLoader().getResourceAsStream(dropletFilename), false, - TextureIO.getFileSuffix(dropletFilename)); + FileUtil.getFileSuffix(dropletFilename)); // load the cubemap texture cubemap = Cubemap.loadFromStreams(getClass().getClassLoader(), diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java index 5c587c2..555214f 100644 --- a/src/demos/tess/Tess.java +++ b/src/demos/tess/Tess.java @@ -60,7 +60,7 @@ package demos.tess; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import java.awt.*; import java.awt.event.WindowAdapter; @@ -76,22 +76,18 @@ public class Tess { frame.add(canvas); canvas.addGLEventListener(new TessRenderer()); - final Animator animator = new Animator(canvas); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { // Run this on another thread than the AWT event queue to - // make sure the call to Animator.stop() completes before - // exiting + // avoid deadlocks on shutdown on some platforms new Thread(new Runnable() { public void run() { - animator.stop(); System.exit(0); } }).start(); } }); frame.show(); - animator.start(); } catch (Exception e) { e.printStackTrace(); } diff --git a/src/demos/testContextDestruction/TestContextDestruction.java b/src/demos/testContextDestruction/TestContextDestruction.java index 7f5fd64..1355d11 100755 --- a/src/demos/testContextDestruction/TestContextDestruction.java +++ b/src/demos/testContextDestruction/TestContextDestruction.java @@ -45,7 +45,7 @@ import java.util.*; import javax.swing.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; /** A simple demonstration exercising context creation and destruction as a GLCanvas is added to and removed from its parent container. */ diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java index e63b3ad..d0be0c1 100644 --- a/src/demos/testContextSharing/TestContextSharing.java +++ b/src/demos/testContextSharing/TestContextSharing.java @@ -43,7 +43,6 @@ import java.awt.*; import java.util.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; /** A simple demonstration of sharing of display lists between drawables. */ diff --git a/src/demos/texture/TestTexture.java b/src/demos/texture/TestTexture.java index 923fbd6..e6fcde2 100755 --- a/src/demos/texture/TestTexture.java +++ b/src/demos/texture/TestTexture.java @@ -46,7 +46,7 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.texture.*; /** Demonstrates simple use of the TextureIO texture loader. */ @@ -106,7 +106,7 @@ public class TestTexture implements GLEventListener { menuBar.add(menu); canvas.addGLEventListener(this); - frame.add(canvas); + frame.getContentPane().add(canvas); frame.setJMenuBar(menuBar); frame.setSize(800, 600); frame.show(); diff --git a/src/demos/texture/TextureConvert.java b/src/demos/texture/TextureConvert.java index b0c6bbd..f4af495 100755 --- a/src/demos/texture/TextureConvert.java +++ b/src/demos/texture/TextureConvert.java @@ -43,7 +43,8 @@ import java.io.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.texture.*; /** Demonstrates how the TextureIO subsystem may be used to convert textures between multiple file formats, including texture @@ -72,7 +73,7 @@ public class TextureConvert { GL gl = pbuffer.getGL(); boolean attemptCompression = false; - if (TextureIO.DDS.equals(TextureIO.getFileSuffix(outputFile))) { + if (TextureIO.DDS.equals(FileUtil.getFileSuffix(outputFile))) { if (gl.isExtensionAvailable("GL_EXT_texture_compression_s3tc") || gl.isExtensionAvailable("GL_NV_texture_compression_vtc")) { attemptCompression = true; diff --git a/src/demos/util/Bunny.java b/src/demos/util/Bunny.java index 50033b2..b9565d6 100644 --- a/src/demos/util/Bunny.java +++ b/src/demos/util/Bunny.java @@ -42,7 +42,6 @@ package demos.util; import java.io.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; /** Renders a bunny. diff --git a/src/demos/util/Cubemap.java b/src/demos/util/Cubemap.java index fc7cd16..52e2977 100755 --- a/src/demos/util/Cubemap.java +++ b/src/demos/util/Cubemap.java @@ -42,7 +42,8 @@ package demos.util; import java.io.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.texture.*; /** Helper class for loading cubemaps from a set of textures. */ @@ -65,7 +66,7 @@ public class Cubemap { String resourceName = basename + suffixes[i] + "." + suffix; TextureData data = TextureIO.newTextureData(scope.getResourceAsStream(resourceName), mipmapped, - TextureIO.getFileSuffix(resourceName)); + FileUtil.getFileSuffix(resourceName)); if (data == null) { throw new IOException("Unable to load texture " + resourceName); } diff --git a/src/demos/util/DxTex.java b/src/demos/util/DxTex.java index 2fb65de..433a2b4 100644 --- a/src/demos/util/DxTex.java +++ b/src/demos/util/DxTex.java @@ -47,7 +47,7 @@ import javax.swing.*; import javax.swing.event.*; import javax.swing.filechooser.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.texture.spi.*; /** Simplified clone of DxTex tool from the DirectX SDK, written in Java using the DDSImage; tests fetching of texture data */ diff --git a/src/demos/util/ObjReader.java b/src/demos/util/ObjReader.java index 1204ed5..51da398 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 com.sun.opengl.utils.*; +import com.sun.opengl.util.*; /** Simple parser for Wavefront .OBJ files. Does not support all file options -- currently requires vertices and normals (only) to be @@ -310,10 +310,10 @@ public class ObjReader { newVertices.trim(); newVertexNormals.trim(); newIndices.trim(); - vertices = BufferUtils.newFloatBuffer(newVertices.size()); + vertices = BufferUtil.newFloatBuffer(newVertices.size()); vertices.put(newVertices.getData()); vertices.rewind(); - normals = BufferUtils.newFloatBuffer(newVertexNormals.size()); + normals = BufferUtil.newFloatBuffer(newVertexNormals.size()); normals.put(newVertexNormals.getData()); normals.rewind(); faceIndices = newIndices; diff --git a/src/demos/util/Triceratops.java b/src/demos/util/Triceratops.java index 6256a0c..c7fa115 100644 --- a/src/demos/util/Triceratops.java +++ b/src/demos/util/Triceratops.java @@ -42,7 +42,6 @@ package demos.util; import java.io.*; import javax.media.opengl.*; -import com.sun.opengl.utils.*; /** Renders a triceratops. <P> diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java index dcf6df4..8007232 100644 --- a/src/demos/vertexArrayRange/VertexArrayRange.java +++ b/src/demos/vertexArrayRange/VertexArrayRange.java @@ -41,8 +41,8 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java index 6d5224d..e58d0fa 100644 --- a/src/demos/vertexBufferObject/VertexBufferObject.java +++ b/src/demos/vertexBufferObject/VertexBufferObject.java @@ -41,8 +41,7 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; @@ -354,8 +353,8 @@ public class VertexBufferObject extends Demo { buffers[i].vertices = sliceBuffer(bigArray, startIndex, sliceSize); buffers[i].normals = sliceBuffer(buffers[i].vertices, 3, buffers[i].vertices.limit() - 3); - buffers[i].vertexOffset = startIndex * BufferUtils.SIZEOF_FLOAT; - buffers[i].normalOffset = (startIndex + 3) * BufferUtils.SIZEOF_FLOAT; + buffers[i].vertexOffset = startIndex * BufferUtil.SIZEOF_FLOAT; + buffers[i].normalOffset = (startIndex + 3) * BufferUtil.SIZEOF_FLOAT; } } @@ -630,7 +629,7 @@ public class VertexBufferObject extends Demo { for (int i = 0; i < len; i++) { ++numDrawElementsCalls; gl.glDrawElements(primitive, 2 * STRIP_SIZE, GL.GL_UNSIGNED_INT, - i * 2 * STRIP_SIZE * BufferUtils.SIZEOF_INT); + i * 2 * STRIP_SIZE * BufferUtil.SIZEOF_INT); if(getFlag('f')) { gl.glFlush(); } @@ -737,7 +736,7 @@ public class VertexBufferObject extends Demo { elementBufferObject = tmp[0]; gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, elementBufferObject); gl.glBufferDataARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, - linearElements.remaining() * BufferUtils.SIZEOF_INT, + linearElements.remaining() * BufferUtil.SIZEOF_INT, linearElements, GL.GL_STATIC_DRAW_ARB); gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, 0); diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java index 00e1d4c..8c2e0e7 100644 --- a/src/demos/vertexProgRefract/VertexProgRefract.java +++ b/src/demos/vertexProgRefract/VertexProgRefract.java @@ -45,7 +45,8 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; +import com.sun.opengl.util.texture.*; import demos.common.*; import demos.util.*; import gleem.*; diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java index 07605e8..4eab14d 100644 --- a/src/demos/vertexProgWarp/VertexProgWarp.java +++ b/src/demos/vertexProgWarp/VertexProgWarp.java @@ -42,7 +42,7 @@ import javax.swing.*; import javax.media.opengl.*; import javax.media.opengl.glu.*; -import com.sun.opengl.utils.*; +import com.sun.opengl.util.*; import demos.common.*; import demos.util.*; import gleem.*; |