summaryrefslogtreecommitdiffstats
path: root/src/gleem/TestTranslate1.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-11-21 01:09:31 +0000
committerKenneth Russel <[email protected]>2008-11-21 01:09:31 +0000
commit985276e9c7eea8b85936435eff35e10ed113840b (patch)
treea4fdc33ee42a49cc834ace4171c7a21e0ffa2882 /src/gleem/TestTranslate1.java
parentf25bdef3b6bc423a08390ab17e86897c85b71282 (diff)
Changed gleem to explicitly declare AWT dependencies. Updated all
demos. All demos now build cleanly. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@291 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/gleem/TestTranslate1.java')
-rw-r--r--src/gleem/TestTranslate1.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gleem/TestTranslate1.java b/src/gleem/TestTranslate1.java
index 83a2a00..fccc5f9 100644
--- a/src/gleem/TestTranslate1.java
+++ b/src/gleem/TestTranslate1.java
@@ -45,8 +45,10 @@ import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
+import javax.media.opengl.awt.AWTGLAutoDrawable;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
@@ -93,20 +95,20 @@ public class TestTranslate1 {
// Register the window with the ManipManager
ManipManager manager = ManipManager.getManipManager();
- manager.registerWindow(drawable);
+ manager.registerWindow((AWTGLAutoDrawable) drawable);
// Instantiate a Translate1Manip
Translate1Manip manip = new Translate1Manip();
manip.setTranslation(new Vec3f(0, 0, -5));
manip.setAxis(new Vec3f(-1, 0.5f, 1));
- manager.showManipInWindow(manip, drawable);
+ manager.showManipInWindow(manip, (AWTGLAutoDrawable) drawable);
}
public void display(GLAutoDrawable drawable) {
- GL gl = drawable.getGL();
+ GL2 gl = drawable.getGL().getGL2();
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- ManipManager.getManipManager().updateCameraParameters(drawable, params);
- ManipManager.getManipManager().render(drawable, gl);
+ ManipManager.getManipManager().updateCameraParameters((AWTGLAutoDrawable) drawable, params);
+ ManipManager.getManipManager().render((AWTGLAutoDrawable) drawable, gl);
}
public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {