summaryrefslogtreecommitdiffstats
path: root/src/demos/tess/Tess.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/tess/Tess.java')
-rw-r--r--src/demos/tess/Tess.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java
index 4063367..354a0c9 100644
--- a/src/demos/tess/Tess.java
+++ b/src/demos/tess/Tess.java
@@ -103,7 +103,12 @@ public class Tess {
public void init(GLDrawable drawable) {
gl = drawable.getGL();
glu = drawable.getGLU();
- 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()));
+ }
double[][] rect = new double[][]{{50.0, 50.0, 0.0},
{200.0, 50.0, 0.0},