diff options
Diffstat (limited to 'src/demos/cg')
-rw-r--r-- | src/demos/cg/runtime_ogl/cgGL_vertex_example.java | 8 | ||||
-rw-r--r-- | src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java | 12 |
2 files changed, 7 insertions, 13 deletions
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) { |