summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <kbrussel@alum.mit.edu>2005-07-10 23:17:52 +0000
committerKenneth Russel <kbrussel@alum.mit.edu>2005-07-10 23:17:52 +0000
commit15bc81d1e89d16e7f462f13acb554d4df27fa1b8 (patch)
tree89dd265110545538f6b236cfd9f62d48fd9126f2 /src
parentaffb27f968fb3cb7902146ad7b521b7b24d18fe5 (diff)
Initial set of context-related changes for the JSR-231 API. GLContext
has been exposed in the public API. The GLEventListener callback mechanism has been removed from the core GLContext implementation and moved up to a higher level. GLAutoDrawable now contains the GLEventListener-related methods, and the GLEventListener's methods now receive a GLAutoDrawable as argument. All JOGL demos have been updated for the new APIs. Many FIXMEs and much unimplemented functionality remain. There is slightly different initialization behavior for the demos containing pbuffers, and the deferring of reshape callbacks needs to be rethought. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@100 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src')
-rw-r--r--src/demos/cg/runtime_ogl/cgGL_vertex_example.java8
-rw-r--r--src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java8
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen.java8
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen2.java8
-rwxr-xr-xsrc/demos/fullscreen/JGearsFullscreen.java8
-rw-r--r--src/demos/gears/Gears.java8
-rwxr-xr-xsrc/demos/hdr/HDR.java41
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java16
-rw-r--r--src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java8
-rw-r--r--src/demos/jgears/JGears.java8
-rwxr-xr-xsrc/demos/jrefract/JRefract.java16
-rwxr-xr-xsrc/demos/multisample/Multisample.java10
-rwxr-xr-xsrc/demos/printext/PrintExt.java8
-rw-r--r--src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java21
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java10
-rw-r--r--src/demos/tess/Tess.java8
-rwxr-xr-xsrc/demos/testContextDestruction/TestContextDestruction.java13
-rw-r--r--src/demos/testContextSharing/TestContextSharing.java10
-rw-r--r--src/demos/vertexArrayRange/VertexArrayRange.java8
-rw-r--r--src/demos/vertexBufferObject/VertexBufferObject.java8
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java8
-rw-r--r--src/demos/vertexProgWarp/VertexProgWarp.java8
-rw-r--r--src/gleem/ExaminerViewer.java45
-rw-r--r--src/gleem/ManipManager.java4
-rw-r--r--src/gleem/TestExaminerViewer.java8
-rw-r--r--src/gleem/TestHandleBox.java8
-rw-r--r--src/gleem/TestMultiWin.java8
-rw-r--r--src/gleem/TestTranslate1.java8
-rw-r--r--src/gleem/TestTranslate2.java8
29 files changed, 168 insertions, 170 deletions
diff --git a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
index 2a43fd6..5e805e1 100644
--- a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
+++ b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
@@ -154,7 +154,7 @@ public class cgGL_vertex_example implements GLEventListener
CgGL.cgGLDisableProfile(profile);
}
- 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);
@@ -173,12 +173,12 @@ public class cgGL_vertex_example implements GLEventListener
v[1][2] = v[2][2] = v[5][2] = v[6][2] = -1;
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
{
// nothing
}
- public void init(GLDrawable drawable)
+ public void init(GLAutoDrawable drawable)
{
// Note: we initialize Cg in this init() method instead of main()
// because Cg (apparently) requires an active OpenGL context in order to
@@ -259,7 +259,7 @@ public class cgGL_vertex_example implements GLEventListener
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height)
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
{
// do nothing
}
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 57693b4..fec2bee 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
@@ -91,7 +91,7 @@ public class runtime_ogl_vertex_fragment implements GLEventListener
// and all the rest happens in the display function...
}
- public void init(GLDrawable drawable)
+ public void init(GLAutoDrawable drawable)
{
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -125,7 +125,7 @@ public class runtime_ogl_vertex_fragment implements GLEventListener
private static int curTime = 0;
// display callback function
- public void display(GLDrawable drawable)
+ public void display(GLAutoDrawable drawable)
{
GL gl = drawable.getGL();
@@ -417,12 +417,12 @@ public class runtime_ogl_vertex_fragment implements GLEventListener
N.put(offsetN + 2, P.get(offsetP + 2));
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
{
// nothing
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height)
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
{
// do nothing
}
diff --git a/src/demos/fullscreen/GearsFullscreen.java b/src/demos/fullscreen/GearsFullscreen.java
index 6c48ef0..f33221a 100755
--- a/src/demos/fullscreen/GearsFullscreen.java
+++ b/src/demos/fullscreen/GearsFullscreen.java
@@ -99,7 +99,7 @@ public class GearsFullscreen {
private int prevMouseX, prevMouseY;
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -164,7 +164,7 @@ public class GearsFullscreen {
});
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -196,7 +196,7 @@ public class GearsFullscreen {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -228,7 +228,7 @@ public class GearsFullscreen {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/fullscreen/GearsFullscreen2.java b/src/demos/fullscreen/GearsFullscreen2.java
index d7502cf..0afad8c 100755
--- a/src/demos/fullscreen/GearsFullscreen2.java
+++ b/src/demos/fullscreen/GearsFullscreen2.java
@@ -120,7 +120,7 @@ public class GearsFullscreen2 {
private int prevMouseX, prevMouseY;
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -186,7 +186,7 @@ public class GearsFullscreen2 {
});
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -218,7 +218,7 @@ public class GearsFullscreen2 {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -250,7 +250,7 @@ public class GearsFullscreen2 {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/fullscreen/JGearsFullscreen.java b/src/demos/fullscreen/JGearsFullscreen.java
index 6b68667..62b10fe 100755
--- a/src/demos/fullscreen/JGearsFullscreen.java
+++ b/src/demos/fullscreen/JGearsFullscreen.java
@@ -118,7 +118,7 @@ public class JGearsFullscreen {
private int prevMouseX, prevMouseY;
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -199,7 +199,7 @@ public class JGearsFullscreen {
actMap.put(act, act);
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -231,7 +231,7 @@ public class JGearsFullscreen {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -263,7 +263,7 @@ public class JGearsFullscreen {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java
index c007004..2ebc11d 100644
--- a/src/demos/gears/Gears.java
+++ b/src/demos/gears/Gears.java
@@ -46,7 +46,7 @@ public class Gears {
private int prevMouseX, prevMouseY;
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -92,7 +92,7 @@ public class Gears {
drawable.addMouseMotionListener(this);
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -124,7 +124,7 @@ public class Gears {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -156,7 +156,7 @@ public class Gears {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java
index 76b66ac..db79bd6 100755
--- a/src/demos/hdr/HDR.java
+++ b/src/demos/hdr/HDR.java
@@ -170,7 +170,6 @@ public class HDR {
canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
canvas.addGLEventListener(new Listener());
- canvas.setNoAutoRedrawMode(true);
animator = new Animator(canvas);
@@ -207,7 +206,7 @@ public class HDR {
private boolean wire = false;
private boolean toggleWire = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// printThreadName("init for Listener");
GL gl = drawable.getGL();
@@ -293,7 +292,7 @@ public class HDR {
viewer.setZFar(zFar);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// printThreadName("display for Listener");
if (initFailed) {
@@ -358,10 +357,10 @@ public class HDR {
Thread.yield();
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
@@ -502,7 +501,7 @@ public class HDR {
//
class PbufferListener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// printThreadName("init for PbufferListener");
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -549,7 +548,7 @@ public class HDR {
pipeline.initFloatingPointTexture(gl, pbuffer_tex, pbuffer_w, pbuffer_h);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// printThreadName("display for PbufferListener");
GL gl = drawable.getGL();
@@ -562,8 +561,8 @@ public class HDR {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
@@ -693,7 +692,7 @@ public class HDR {
}
class BlurPbufferListener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// printThreadName("init for BlurPbufferListener");
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -706,7 +705,7 @@ public class HDR {
pipeline.initFloatingPointTexture(gl, blur_pbuffer_tex, blur_w, blur_h);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// printThreadName("display for BlurPbufferListener");
GL gl = drawable.getGL();
@@ -721,12 +720,12 @@ public class HDR {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
class Blur2PbufferListener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// printThreadName("init for Blur2PbufferListener");
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -738,7 +737,7 @@ public class HDR {
pipeline.initFloatingPointTexture(gl, blur2_pbuffer_tex, blur_w, blur_h);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// printThreadName("display for Blur2PbufferListener");
GL gl = drawable.getGL();
@@ -769,12 +768,12 @@ public class HDR {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
class TonemapPbufferListener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
setOrthoProjection(gl, pbuffer_w, pbuffer_h);
@@ -782,7 +781,7 @@ public class HDR {
pipeline.initTexture(gl, tonemap_pbuffer_tex, pbuffer_w, pbuffer_h);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
toneMappingPass(gl);
@@ -791,8 +790,8 @@ public class HDR {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
//----------------------------------------------------------------------
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
index f757a9a..74f4355 100644
--- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
+++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
@@ -160,7 +160,7 @@ public class HWShadowmapsSimple {
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -279,7 +279,7 @@ public class HWShadowmapsSimple {
});
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
viewer.update();
// Grab these values once per render to avoid multithreading
@@ -332,8 +332,8 @@ public class HWShadowmapsSimple {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
@@ -373,7 +373,7 @@ public class HWShadowmapsSimple {
}
class PbufferListener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -397,7 +397,7 @@ public class HWShadowmapsSimple {
fullyInitialized = true;
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
@@ -418,8 +418,8 @@ public class HWShadowmapsSimple {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
private void set_light_view_texture_parameters(GL gl) {
diff --git a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
index 990b8c0..7232957 100644
--- a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
+++ b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
@@ -160,7 +160,7 @@ public class InfiniteShadowVolumes {
private boolean toggleWireframe;
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
@@ -280,7 +280,7 @@ public class InfiniteShadowVolumes {
// glutAddMenuEntry("quit [<esc>]", 27);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
if (quit) {
return;
}
@@ -546,8 +546,8 @@ public class InfiniteShadowVolumes {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
diff --git a/src/demos/jgears/JGears.java b/src/demos/jgears/JGears.java
index 91704f5..6a4d539 100644
--- a/src/demos/jgears/JGears.java
+++ b/src/demos/jgears/JGears.java
@@ -70,7 +70,7 @@ public class JGears {
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -113,7 +113,7 @@ public class JGears {
drawable.addMouseMotionListener(this);
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -145,7 +145,7 @@ public class JGears {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -177,7 +177,7 @@ public class JGears {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java
index 4775073..7947a90 100755
--- a/src/demos/jrefract/JRefract.java
+++ b/src/demos/jrefract/JRefract.java
@@ -337,7 +337,7 @@ public class JRefract {
"\n" +
"END\n";
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -453,7 +453,7 @@ public class JRefract {
}
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
if (quit) {
return;
}
@@ -567,8 +567,8 @@ public class JRefract {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
@@ -924,7 +924,7 @@ public class JRefract {
private boolean mouseRButtonDown = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// Use debug pipeline
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -967,7 +967,7 @@ public class JRefract {
drawable.addMouseMotionListener(this);
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -999,7 +999,7 @@ public class JRefract {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -1031,7 +1031,7 @@ public class JRefract {
gl.glPopMatrix();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
private void gear(GL gl,
float inner_radius,
diff --git a/src/demos/multisample/Multisample.java b/src/demos/multisample/Multisample.java
index f479b0e..6dd00d3 100755
--- a/src/demos/multisample/Multisample.java
+++ b/src/demos/multisample/Multisample.java
@@ -83,7 +83,7 @@ public class Multisample {
caps.setSampleBuffers(true);
caps.setNumSamples(4);
- canvas = GLDrawableFactory.getFactory().createGLCanvas(caps, chooser);
+ canvas = GLDrawableFactory.getFactory().createGLCanvas(caps, chooser, null, null);
canvas.addGLEventListener(new Listener());
Frame frame = new Frame("Full-scene antialiasing");
@@ -123,7 +123,7 @@ public class Multisample {
}
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
@@ -138,7 +138,7 @@ public class Multisample {
gl.glOrtho(-1, 1, -1, 1, -1, 1);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
@@ -161,8 +161,8 @@ public class Multisample {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
private void runExit() {
diff --git a/src/demos/printext/PrintExt.java b/src/demos/printext/PrintExt.java
index 3edb3a0..ebc9551 100755
--- a/src/demos/printext/PrintExt.java
+++ b/src/demos/printext/PrintExt.java
@@ -20,7 +20,7 @@ public class PrintExt {
}
static class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
System.out.println("GL vendor: " + gl.glGetString(GL.GL_VENDOR));
System.out.println("GL version: " + gl.glGetString(GL.GL_VERSION));
@@ -44,13 +44,13 @@ public class PrintExt {
runExit();
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
}
- public void reshape(GLDrawable drawable, int x, int y, int w, int h) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
}
}
diff --git a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
index d2a04af..7f8d67b 100644
--- a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
+++ b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
@@ -82,7 +82,12 @@ public class ProceduralTexturePhysics {
public void run(String[] args) {
canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
canvas.addGLEventListener(new Listener());
- canvas.setNoAutoRedrawMode(true);
+ water = new Water();
+ water.initialize("demos/data/images/nvfixed.tga",
+ "demos/data/images/nvspin.tga",
+ "demos/data/images/droplet.tga",
+ "demos/data/cubemaps/CloudyHills_{0}.tga",
+ canvas);
animator = new Animator(canvas);
@@ -100,12 +105,6 @@ public class ProceduralTexturePhysics {
}
});
- water = new Water();
- water.initialize("demos/data/images/nvfixed.tga",
- "demos/data/images/nvspin.tga",
- "demos/data/images/droplet.tga",
- "demos/data/cubemaps/CloudyHills_{0}.tga",
- canvas);
animator.start();
}
@@ -126,7 +125,7 @@ public class ProceduralTexturePhysics {
private float bumpIncrement = 0.01f;
private float frequencyIncrement = 0.1f;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
gl.setSwapInterval(1);
@@ -189,7 +188,7 @@ public class ProceduralTexturePhysics {
});
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
if (!firstRender) {
if (++frameCount == 30) {
timer.stop();
@@ -229,10 +228,10 @@ public class ProceduralTexturePhysics {
water.draw(gl, params.getOrientation().inverse());
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index 56357fb..295da6c 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -75,7 +75,7 @@ public class Water {
private String tmpDropletFilename;
private String tmpCubeMapFilenamePattern;
- private GLDrawable pbuffer;
+ private GLPbuffer pbuffer;
private Rotf cameraOrientation = new Rotf();
// Static texture names
@@ -408,14 +408,14 @@ public class Water {
//
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
initOpenGL(gl, glu);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
if (mustUpdateBlurOffsets) {
updateBlurVertOffset(gl);
@@ -448,10 +448,10 @@ public class Water {
}
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
private TGAImage loadImage(String resourceName) {
diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java
index 43a52ae..3bd02b5 100644
--- a/src/demos/tess/Tess.java
+++ b/src/demos/tess/Tess.java
@@ -100,7 +100,7 @@ public class Tess {
private GLU glu;
private int startList;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
drawable.setGL(new DebugGL(drawable.getGL()));
gl = drawable.getGL();
@@ -171,7 +171,7 @@ public class Tess {
}//end init
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glOrtho( 0, 450, 0, 250, -1, 1 );
@@ -179,10 +179,10 @@ public class Tess {
gl.glLoadIdentity();
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
gl.glColor3d(1.0, 1.0, 1.0);
gl.glCallList(startList);
diff --git a/src/demos/testContextDestruction/TestContextDestruction.java b/src/demos/testContextDestruction/TestContextDestruction.java
index fd9dd6e..fea89da 100755
--- a/src/demos/testContextDestruction/TestContextDestruction.java
+++ b/src/demos/testContextDestruction/TestContextDestruction.java
@@ -176,7 +176,7 @@ public class TestContextDestruction {
}
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
System.out.println("Listener.init()");
drawable.setGL(new DebugGL(drawable.getGL()));
@@ -193,11 +193,10 @@ public class TestContextDestruction {
gl.glEnable(GL.GL_NORMALIZE);
- Dimension d = drawable.getSize();
- reshape(drawable, 0, 0, d.width, d.height);
+ reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight());
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
angle += 2.0f;
GL gl = drawable.getGL();
@@ -210,7 +209,7 @@ public class TestContextDestruction {
gl.glPopMatrix();
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
System.out.println("Listener.reshape()");
GL gl = drawable.getGL();
@@ -224,7 +223,7 @@ public class TestContextDestruction {
gl.glTranslatef(0.0f, 0.0f, -40.0f);
}
- public void destroy(GLDrawable drawable) {
+ public void destroy(GLAutoDrawable drawable) {
System.out.println("Listener.destroy()");
GL gl = drawable.getGL();
gl.glDeleteLists(gearDisplayList, 1);
@@ -232,7 +231,7 @@ public class TestContextDestruction {
}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
private synchronized void initializeDisplayList(GL gl) {
diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java
index 272c363..93801a6 100644
--- a/src/demos/testContextSharing/TestContextSharing.java
+++ b/src/demos/testContextSharing/TestContextSharing.java
@@ -62,7 +62,7 @@ public class TestContextSharing {
frame1.setLayout(new BorderLayout());
frame1.add(canvas1, BorderLayout.CENTER);
- GLCanvas canvas2 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities(), canvas1);
+ GLCanvas canvas2 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities(), null, canvas1, null);
canvas2.addGLEventListener(new Listener());
canvas2.setSize(256, 256);
Frame frame2 = new Frame("Canvas 2");
@@ -96,7 +96,7 @@ public class TestContextSharing {
}
class Listener implements GLEventListener {
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
drawable.setGL(new DebugGL(drawable.getGL()));
GL gl = drawable.getGL();
@@ -113,7 +113,7 @@ public class TestContextSharing {
gl.glEnable(GL.GL_NORMALIZE);
}
- 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);
@@ -122,7 +122,7 @@ public class TestContextSharing {
gl.glCallList(gearDisplayList);
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
GL gl = drawable.getGL();
float h = (float)height / (float)width;
@@ -136,7 +136,7 @@ public class TestContextSharing {
}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
private synchronized void initializeDisplayList(GL gl) {
diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java
index fee4280..6b598f3 100644
--- a/src/demos/vertexArrayRange/VertexArrayRange.java
+++ b/src/demos/vertexArrayRange/VertexArrayRange.java
@@ -277,7 +277,7 @@ public class VertexArrayRange {
class VARListener implements GLEventListener {
boolean exiting = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// drawable.setGL(new TraceGL(drawable.getGL(), System.err));
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -458,7 +458,7 @@ public class VertexArrayRange {
}
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// Don't try to do OpenGL operations if we're tearing things down
if (quit) {
return;
@@ -653,10 +653,10 @@ public class VertexArrayRange {
}
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
} // end class VARListener
private void allocateBigArray(GL gl, boolean tryAgain) {
diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java
index 060fd62..f6dab6c 100644
--- a/src/demos/vertexBufferObject/VertexBufferObject.java
+++ b/src/demos/vertexBufferObject/VertexBufferObject.java
@@ -271,7 +271,7 @@ public class VertexBufferObject {
class VBOListener implements GLEventListener {
boolean exiting = false;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
// drawable.setGL(new TraceGL(drawable.getGL(), System.err));
// drawable.setGL(new DebugGL(drawable.getGL()));
@@ -450,7 +450,7 @@ public class VertexBufferObject {
}
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
// Don't try to do OpenGL operations if we're tearing things down
if (quit) {
return;
@@ -677,10 +677,10 @@ public class VertexBufferObject {
}
}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
} // end class VBOListener
private void allocateBigArray(GL gl) {
diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java
index 6e5a85d..1e3a5e1 100644
--- a/src/demos/vertexProgRefract/VertexProgRefract.java
+++ b/src/demos/vertexProgRefract/VertexProgRefract.java
@@ -226,7 +226,7 @@ public class VertexProgRefract {
"\n" +
"END\n";
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
float cc = 1.0f;
@@ -325,7 +325,7 @@ public class VertexProgRefract {
viewer.setZFar(10.0f);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
if (quit) {
return;
}
@@ -438,8 +438,8 @@ public class VertexProgRefract {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java
index bacecab..a95f149 100644
--- a/src/demos/vertexProgWarp/VertexProgWarp.java
+++ b/src/demos/vertexProgWarp/VertexProgWarp.java
@@ -124,7 +124,7 @@ public class VertexProgWarp {
private ExaminerViewer viewer;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
GLU glu = drawable.getGLU();
@@ -202,7 +202,7 @@ public class VertexProgWarp {
viewer.setZFar(zFar);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
if (!firstRender) {
if (++frameCount == 30) {
timer.stop();
@@ -267,8 +267,8 @@ public class VertexProgWarp {
}
// Unused routines
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
//----------------------------------------------------------------------
// Internals only below this point
diff --git a/src/gleem/ExaminerViewer.java b/src/gleem/ExaminerViewer.java
index 9760165..e60d4f7 100644
--- a/src/gleem/ExaminerViewer.java
+++ b/src/gleem/ExaminerViewer.java
@@ -50,7 +50,7 @@ import net.java.games.jogl.*;
manipulator hierarchy. It is an example of how you might integrate
gleem with another application which uses the mouse. </P>
- <P> For the given GLDrawable, the ExaminerViewer takes over the
+ <P> For the given GLAutoDrawable, the ExaminerViewer takes over the
setting of the view position. It passes along mouse events it is
not interested in to the ManipManager's mouse routines. </P>
@@ -71,7 +71,7 @@ import net.java.games.jogl.*;
button. </P> */
public class ExaminerViewer {
- private GLDrawable window;
+ private GLAutoDrawable window;
/** Simple state machine for figuring out whether we are grabbing
events */
private boolean interactionUnderway;
@@ -125,12 +125,12 @@ public class ExaminerViewer {
};
private GLEventListener glListener = new GLEventListener() {
- public void init(GLDrawable drawable) {}
- public void display(GLDrawable drawable) {}
- public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
+ public void init(GLAutoDrawable drawable) {}
+ public void display(GLAutoDrawable drawable) {}
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
reshapeMethod(width, height);
}
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
};
/** The constructor takes the number of mouse buttons on this system
@@ -140,17 +140,17 @@ public class ExaminerViewer {
oldNumMouseButtons = numMouseButtons;
}
- /** <P> Attaches this ExaminerViewer to the given GLDrawable. This
+ /** <P> Attaches this ExaminerViewer to the given GLAutoDrawable. This
causes the ManipManager's mouse routines to be removed from the
window (using ManipManager.removeMouseListeners) and the
- ExaminerViewer's to be installed. The GLDrawable should be
+ ExaminerViewer's to be installed. The GLAutoDrawable should be
registered with the ManipManager before the ExaminerViewer is
attached to it. </P>
<P> In order for the viewer to do anything useful, you need to
provide a BSphereProvider to it to allow "view all"
functionality. </P> */
- public void attach(GLDrawable window, BSphereProvider provider) {
+ public void attach(GLAutoDrawable window, BSphereProvider provider) {
this.window = window;
this.provider = provider;
init();
@@ -158,7 +158,7 @@ public class ExaminerViewer {
}
/** Detaches from the given window. This causes the ManipManager's
- mouse listeners to be reinstalled on the GLDrawable and the
+ mouse listeners to be reinstalled on the GLAutoDrawable and the
ExaminerViewer's to be removed. */
public void detach() {
removeListeners();
@@ -355,9 +355,8 @@ public class ExaminerViewer {
button1Down = false;
button2Down = false;
- Dimension size = window.getSize();
- int xSize = size.width;
- int ySize = size.height;
+ int xSize = window.getWidth();
+ int ySize = window.getHeight();
params.setOrientation(orientation);
params.setPosition(computePosition(new Vec3f()));
params.setForwardDirection(Vec3f.NEG_Z_AXIS);
@@ -411,10 +410,12 @@ public class ExaminerViewer {
}
- // Force redraw if window will not do it automatically
- if (!window.getNoAutoRedrawMode()) {
- window.display();
- }
+ // Force redraw
+ // FIXME: this can cause bad behavior (slowdowns, jittery
+ // rendering) if window is being automatically rendered; should
+ // have flag to disable auto redraw by the examiner viewer,
+ // since that API isn't present in the GLDrawable any more
+ window.display();
}
}
@@ -471,10 +472,12 @@ public class ExaminerViewer {
iOwnInteraction = false;
}
- // Force redraw if window will not do it automatically
- if (!window.getNoAutoRedrawMode()) {
- window.display();
- }
+ // Force redraw
+ // FIXME: this can cause bad behavior (slowdowns, jittery
+ // rendering) if window is being automatically rendered; should
+ // have flag to disable auto redraw by the examiner viewer,
+ // since that API isn't present in the GLDrawable any more
+ window.display();
}
}
diff --git a/src/gleem/ManipManager.java b/src/gleem/ManipManager.java
index 0a0d86d..439d4fa 100644
--- a/src/gleem/ManipManager.java
+++ b/src/gleem/ManipManager.java
@@ -79,9 +79,7 @@ public class ManipManager {
};
private WindowUpdateListener defaultWindowListener = new WindowUpdateListener() {
public void update(GLDrawable window) {
- if (!window.getNoAutoRedrawMode()) {
- window.display();
- }
+ window.display();
}
};
private WindowUpdateListener windowListener;
diff --git a/src/gleem/TestExaminerViewer.java b/src/gleem/TestExaminerViewer.java
index 3ba68e4..d793846 100644
--- a/src/gleem/TestExaminerViewer.java
+++ b/src/gleem/TestExaminerViewer.java
@@ -77,7 +77,7 @@ public class TestExaminerViewer {
private CameraParameters params = new CameraParameters();
private ExaminerViewer viewer;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
@@ -122,7 +122,7 @@ public class TestExaminerViewer {
viewer.viewAll(gl);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
viewer.update(gl);
ManipManager.getManipManager().updateCameraParameters(drawable, viewer.getCameraParameters());
@@ -130,8 +130,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) {
diff --git a/src/gleem/TestHandleBox.java b/src/gleem/TestHandleBox.java
index 0761c8b..e47c1ab 100644
--- a/src/gleem/TestHandleBox.java
+++ b/src/gleem/TestHandleBox.java
@@ -55,7 +55,7 @@ public class TestHandleBox {
private GLU glu;
private CameraParameters params = new CameraParameters();
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
@@ -95,13 +95,13 @@ public class TestHandleBox {
manager.showManipInWindow(manip, drawable);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
ManipManager.getManipManager().updateCameraParameters(drawable, params);
ManipManager.getManipManager().render(drawable, gl);
}
- public void reshape(GLDrawable drawable, int x, int y, int w, int h) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
float aspect, theta;
aspect = (float) w / (float) h;
if (w >= h)
@@ -120,7 +120,7 @@ public class TestHandleBox {
}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
public static void main(String[] args) {
diff --git a/src/gleem/TestMultiWin.java b/src/gleem/TestMultiWin.java
index 4b9fa58..7a9fe14 100644
--- a/src/gleem/TestMultiWin.java
+++ b/src/gleem/TestMultiWin.java
@@ -79,7 +79,7 @@ public class TestMultiWin {
private CameraParameters params = new CameraParameters();
private ExaminerViewer viewer;
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
@@ -121,7 +121,7 @@ public class TestMultiWin {
viewer.viewAll(gl);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
viewer.update(gl);
ManipManager.getManipManager().updateCameraParameters(drawable, viewer.getCameraParameters());
@@ -129,8 +129,8 @@ public class TestMultiWin {
}
// 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) {}
}
private static void showFrame(String name, Point location) {
diff --git a/src/gleem/TestTranslate1.java b/src/gleem/TestTranslate1.java
index 79fb4ca..086e3a7 100644
--- a/src/gleem/TestTranslate1.java
+++ b/src/gleem/TestTranslate1.java
@@ -55,7 +55,7 @@ public class TestTranslate1 {
private GLU glu;
private CameraParameters params = new CameraParameters();
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
@@ -96,13 +96,13 @@ public class TestTranslate1 {
manager.showManipInWindow(manip, drawable);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
ManipManager.getManipManager().updateCameraParameters(drawable, params);
ManipManager.getManipManager().render(drawable, gl);
}
- public void reshape(GLDrawable drawable, int x, int y, int w, int h) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
float aspect, theta;
aspect = (float) w / (float) h;
if (w >= h)
@@ -121,7 +121,7 @@ public class TestTranslate1 {
}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
public static void main(String[] args) {
diff --git a/src/gleem/TestTranslate2.java b/src/gleem/TestTranslate2.java
index 0906d8f..70a0041 100644
--- a/src/gleem/TestTranslate2.java
+++ b/src/gleem/TestTranslate2.java
@@ -55,7 +55,7 @@ public class TestTranslate2 {
private GLU glu;
private CameraParameters params = new CameraParameters();
- public void init(GLDrawable drawable) {
+ public void init(GLAutoDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
@@ -96,13 +96,13 @@ public class TestTranslate2 {
manager.showManipInWindow(manip, drawable);
}
- public void display(GLDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
ManipManager.getManipManager().updateCameraParameters(drawable, params);
ManipManager.getManipManager().render(drawable, gl);
}
- public void reshape(GLDrawable drawable, int x, int y, int w, int h) {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
float aspect, theta;
aspect = (float) w / (float) h;
if (w >= h)
@@ -121,7 +121,7 @@ public class TestTranslate2 {
}
// Unused routines
- public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
}
public static void main(String[] args) {