From e9d9b9561c05ab8819ffff7c4b32ed9b1f8a2333 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 28 Feb 2005 17:39:39 +0000 Subject: Fixed bug in demos pointed out by chrisDUPUIS on javagaming.org forums where we were creating multiple DebugGLs in particular in the TestContextDestruction demo, which was the cause of the slowdown in that demo git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@63 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java') diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index f8a01aa..049bd3d 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -161,7 +161,12 @@ public class HWShadowmapsSimple { class Listener implements GLEventListener { public void init(GLDrawable drawable) { - // drawable.setGL(new DebugGL(drawable.getGL())); + // init() might get called more than once if the GLCanvas is + // added and removed, but we only want to install the DebugGL + // pipeline once + // if (!(drawable.getGL() instanceof DebugGL)) { + // drawable.setGL(new DebugGL(drawable.getGL())); + // } GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); @@ -376,7 +381,12 @@ public class HWShadowmapsSimple { class PbufferListener implements GLEventListener { public void init(GLDrawable drawable) { - // drawable.setGL(new DebugGL(drawable.getGL())); + // init() might get called more than once if the GLCanvas is + // added and removed, but we only want to install the DebugGL + // pipeline once + // if (!(drawable.getGL() instanceof DebugGL)) { + // drawable.setGL(new DebugGL(drawable.getGL())); + // } GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); -- cgit v1.2.3