diff options
author | Kenneth Russel <[email protected]> | 2005-07-10 23:17:52 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-07-10 23:17:52 +0000 |
commit | 15bc81d1e89d16e7f462f13acb554d4df27fa1b8 (patch) | |
tree | 89dd265110545538f6b236cfd9f62d48fd9126f2 /src/demos/hdr/HDR.java | |
parent | affb27f968fb3cb7902146ad7b521b7b24d18fe5 (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/demos/hdr/HDR.java')
-rwxr-xr-x | src/demos/hdr/HDR.java | 41 |
1 files changed, 20 insertions, 21 deletions
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) {} } //---------------------------------------------------------------------- |