summaryrefslogtreecommitdiffstats
path: root/src/demos/misc/Picking.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-30 02:06:00 +0200
committerSven Gothel <[email protected]>2010-03-30 02:06:00 +0200
commit2e4835c543d32791cf3c79907aecad7c4692f457 (patch)
tree613d0f21c1cb79a400b4b188534ec033343bfc87 /src/demos/misc/Picking.java
parentd3e818ea8b7c3f45ed4cfac7b0e7d3bd24f956e5 (diff)
parent0b708395a18eb6a2ae5372ff414bc75830ce19b6 (diff)
Merge branch 'master' of github.com:mbien/jogl-demos
Diffstat (limited to 'src/demos/misc/Picking.java')
-rwxr-xr-xsrc/demos/misc/Picking.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/demos/misc/Picking.java b/src/demos/misc/Picking.java
index 27a0fe2..0e1596a 100755
--- a/src/demos/misc/Picking.java
+++ b/src/demos/misc/Picking.java
@@ -10,6 +10,7 @@ package demos.misc;
// Notes: * Based on example 13-3 (p 542) in the "OpenGL Programming Guide"
// * This version should handle overlapping objects correctly.
//---------------------------------------------------------------------------------
+import com.jogamp.gluegen.runtime.Buffers;
import java.awt.*;
import java.awt.event.*;
import java.awt.Canvas.*;
@@ -18,7 +19,6 @@ import javax.media.opengl.*;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.*;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.BufferUtil;
public class Picking
{
@@ -96,7 +96,7 @@ public class Picking
int buffsize = 512;
double x = (double) mouse_x, y = (double) mouse_y;
int[] viewPort = new int[4];
- IntBuffer selectBuffer = BufferUtil.newIntBuffer(buffsize);
+ IntBuffer selectBuffer = Buffers.newDirectIntBuffer(buffsize);
int hits = 0;
gl.glGetIntegerv(GL2.GL_VIEWPORT, viewPort, 0);
gl.glSelectBuffer(buffsize, selectBuffer);