summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-07-18 23:32:24 +0000
committerKenneth Russel <[email protected]>2009-07-18 23:32:24 +0000
commita33fade58b3cf22b72241767e6615042a5ed22c1 (patch)
tree0f9700cb59193afbf27fef9481b2a28c2d14938d /src/net/java/joglutils/msg/test/DisplayShelfRenderer.java
parent190d2e62712a7de5ee8e9a7989157d06b34aedd9 (diff)
Updates to joglutils workspace to work with JOGL 2 APIs. Cleaned up
build process. Added targets for joglutils.jar and joglutils-demos.jar as well as javadoc. Deleted build directory from svn. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@103 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net/java/joglutils/msg/test/DisplayShelfRenderer.java')
-rw-r--r--src/net/java/joglutils/msg/test/DisplayShelfRenderer.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java b/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java
index adf1263..5cdffc1 100644
--- a/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java
+++ b/src/net/java/joglutils/msg/test/DisplayShelfRenderer.java
@@ -49,7 +49,8 @@ import javax.swing.*;
import javax.swing.event.*;
import javax.media.opengl.*;
-import com.sun.opengl.util.j2d.*;
+import javax.media.opengl.awt.*;
+import com.sun.opengl.util.awt.*;
import net.java.joglutils.msg.actions.*;
import net.java.joglutils.msg.collections.*;
@@ -99,7 +100,7 @@ public class DisplayShelfRenderer implements GLEventListener {
private GLPbuffer sharedPbuffer;
private boolean firstInit = true;
- private GLAutoDrawable drawable;
+ private AWTGLAutoDrawable drawable;
private Separator root;
private Separator imageRoot;
@@ -154,7 +155,7 @@ public class DisplayShelfRenderer implements GLEventListener {
// Create a small pbuffer with which we share textures and display
// lists to avoid having to reload textures during repeated calls
// to init()
- sharedPbuffer = GLDrawableFactory.getFactory().createGLPbuffer(new GLCapabilities(), null, 1, 1, null);
+ sharedPbuffer = GLDrawableFactory.getFactory(GLProfile.getDefault()).createGLPbuffer(new GLCapabilities(GLProfile.getDefault()), null, 1, 1, null);
sharedPbuffer.display();
this.fetcher = new BasicFetcher<Integer>();
@@ -221,8 +222,8 @@ public class DisplayShelfRenderer implements GLEventListener {
return targetIndex;
}
- public void init(GLAutoDrawable drawable) {
- this.drawable = drawable;
+ public void init(GLAutoDrawable d) {
+ this.drawable = (AWTGLAutoDrawable) d;
GL gl = drawable.getGL();
if (firstInit) {
@@ -407,7 +408,7 @@ public class DisplayShelfRenderer implements GLEventListener {
if (repaintAgain) {
animating = true;
- drawable.repaint();
+ ((AWTGLAutoDrawable) drawable).repaint();
} else {
animating = false;
}
@@ -416,7 +417,7 @@ public class DisplayShelfRenderer implements GLEventListener {
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
}
- public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void dispose(GLAutoDrawable drawable) {}
//----------------------------------------------------------------------
// Internals only below this point