summaryrefslogtreecommitdiffstats
path: root/src/gleem/TestExaminerViewer.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-10-24 19:21:28 +0000
committerKenneth Russel <[email protected]>2005-10-24 19:21:28 +0000
commit6873f65775af236ed270fcbd08661f5b53ba3598 (patch)
tree6fcefdc3a9429d7d3071b1464c11d40fa7bc3ab9 /src/gleem/TestExaminerViewer.java
parent538be101e7bce7788c82e1b254a66deb5d35bb56 (diff)
Merged JSR-231 branch on to the main JOGL trunk. The main trunk now
contains the evolving JSR-231 Reference Implementation and the JSR-231 branch is permanently closed. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@144 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/gleem/TestExaminerViewer.java')
-rw-r--r--src/gleem/TestExaminerViewer.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gleem/TestExaminerViewer.java b/src/gleem/TestExaminerViewer.java
index 55d0283..7e52992 100644
--- a/src/gleem/TestExaminerViewer.java
+++ b/src/gleem/TestExaminerViewer.java
@@ -41,7 +41,9 @@ package gleem;
import java.awt.*;
import java.awt.event.*;
-import net.java.games.jogl.*;
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import com.sun.opengl.utils.*;
import gleem.linalg.*;
/** Tests the Examiner Viewer. */
@@ -72,22 +74,20 @@ public class TestExaminerViewer {
}
static class Listener implements GLEventListener {
- private GL gl;
- private GLU glu;
+ private GLU glu = new GLU();
private CameraParameters params = new CameraParameters();
private ExaminerViewer viewer;
- public void init(GLDrawable drawable) {
- gl = drawable.getGL();
- glu = drawable.getGLU();
+ public void init(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
gl.glClearColor(0, 0, 0, 0);
float[] lightPosition = new float[] {1, 1, 1, 0};
float[] ambient = new float[] { 0.0f, 0.0f, 0.0f, 1.0f };
float[] diffuse = new float[] { 1.0f, 1.0f, 1.0f, 1.0f };
- gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, ambient);
- gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, diffuse);
- gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition);
+ gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, ambient, 0);
+ gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, diffuse, 0);
+ gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition, 0);
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_LIGHT0);
@@ -122,7 +122,8 @@ public class TestExaminerViewer {
viewer.viewAll(gl);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
viewer.update(gl);
ManipManager.getManipManager().updateCameraParameters(drawable, viewer.getCameraParameters());
@@ -130,8 +131,8 @@ public class TestExaminerViewer {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int w, int h) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
public static void main(String[] args) {