summaryrefslogtreecommitdiffstats
path: root/src/demos/proceduralTexturePhysics
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-07-17 06:13:30 +0000
committerKenneth Russel <[email protected]>2005-07-17 06:13:30 +0000
commit6f2bdbacf131b05937925fbfe32ac0b603ccbcc6 (patch)
treec4b54e3602f91a90cfb0fbc7d14e01fa89a32ac8 /src/demos/proceduralTexturePhysics
parent15bc81d1e89d16e7f462f13acb554d4df27fa1b8 (diff)
Further context-related changes for the JSR-231 API. The GLContext
implementations on all platforms have been split into orthogonal GLDrawable and GLContext concepts. It is now possible to create more than one GLContet per GLDrawable (though this has not been tested yet). GLCanvas has been reimplemented in terms of GLDrawableFactory.getGLDrawable(). More functionality has been moved from GLDrawable to GLAutoDrawable. Reimplemented lazy sending of reshape GLEventListener events in GLCanvas and GLJPanel and deleted notion of deferred reshapes from GLDrawableHelper and elsewhere. Sharing of textures and display lists is now expressed in terms of GLContexts instead of GLDrawables. Still need to move pbuffer creation into GLDrawableFactory from the onscreen GLContext implementations. Added option to gleem ExaminerViewer to disable automatic redraws upon mouse events and respecified more of gleem to work on GLAutoDrawables rather than GLDrawables. Updated all JOGL demos to work with new APIs and slightly different initialization sequences (in particular, for pbuffers -- this will change with the addition of GLDrawableFactory.createGLPbuffer()). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@103 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/proceduralTexturePhysics')
-rw-r--r--src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java12
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
index 7f8d67b..9713b6b 100644
--- a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
+++ b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
@@ -83,11 +83,6 @@ public class ProceduralTexturePhysics {
canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
canvas.addGLEventListener(new Listener());
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);
@@ -126,6 +121,12 @@ public class ProceduralTexturePhysics {
private float frequencyIncrement = 0.1f;
public void init(GLAutoDrawable drawable) {
+ water.initialize("demos/data/images/nvfixed.tga",
+ "demos/data/images/nvspin.tga",
+ "demos/data/images/droplet.tga",
+ "demos/data/cubemaps/CloudyHills_{0}.tga",
+ drawable);
+
GL gl = drawable.getGL();
gl.setSwapInterval(1);
@@ -150,6 +151,7 @@ public class ProceduralTexturePhysics {
manager.registerWindow(drawable);
viewer = new ExaminerViewer(MouseButtonHelper.numMouseButtons());
+ viewer.setAutoRedrawMode(false);
viewer.attach(drawable, new BSphereProvider() {
public BSphere getBoundingSphere() {
return new BSphere(new Vec3f(0, 0, 0), 1.2f);
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index 295da6c..46d199a 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -186,7 +186,7 @@ public class Water {
String spinFilename,
String dropletFilename,
String cubeMapFilenamePattern,
- GLDrawable parentWindow) {
+ GLAutoDrawable parentWindow) {
loadInitialTexture(initialMapFilename);
tmpSpinFilename = spinFilename;
tmpDropletFilename = dropletFilename;