diff options
Diffstat (limited to 'src/demos/tess')
-rw-r--r-- | src/demos/tess/Tess.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java index ccbd7a6..354a0c9 100644 --- a/src/demos/tess/Tess.java +++ b/src/demos/tess/Tess.java @@ -101,10 +101,14 @@ public class Tess { private int startList; public void init(GLDrawable drawable) { - drawable.setGL(new DebugGL(drawable.getGL())); - gl = drawable.getGL(); glu = drawable.getGLU(); + // 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}, |