summaryrefslogtreecommitdiffstats
path: root/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java')
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java14
1 files changed, 12 insertions, 2 deletions
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();