diff options
Diffstat (limited to 'src/demos')
-rw-r--r-- | src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java | 6 | ||||
-rw-r--r-- | src/demos/gears/Gears.java | 9 | ||||
-rw-r--r-- | src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 16 | ||||
-rw-r--r-- | src/demos/jgears/JGears.java | 8 | ||||
-rwxr-xr-x | src/demos/jrefract/JRefract.java | 6 | ||||
-rw-r--r-- | src/demos/tess/Tess.java | 8 | ||||
-rwxr-xr-x | src/demos/testContextDestruction/TestContextDestruction.java | 7 | ||||
-rw-r--r-- | src/demos/testContextSharing/TestContextSharing.java | 7 | ||||
-rw-r--r-- | src/demos/vertexArrayRange/VertexArrayRange.java | 5 | ||||
-rw-r--r-- | src/demos/vertexBufferObject/VertexBufferObject.java | 5 |
10 files changed, 30 insertions, 47 deletions
diff --git a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java index 3ceabc0..d0b7dc1 100644 --- a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java +++ b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java @@ -67,9 +67,6 @@ public class runtime_ogl_vertex_fragment implements GLEventListener GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new runtime_ogl_vertex_fragment()); - // Use debug pipeline - canvas.setGL(new DebugGL(canvas.getGL())); - frame.add(canvas); frame.setSize(512, 512); final Animator animator = new Animator(canvas); @@ -94,6 +91,9 @@ public class runtime_ogl_vertex_fragment implements GLEventListener public void init(GLDrawable drawable) { + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); // Basic Cg setup; register a callback function for any errors diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java index 775dcf0..da8fdba 100644 --- a/src/demos/gears/Gears.java +++ b/src/demos/gears/Gears.java @@ -17,11 +17,6 @@ public class Gears { Frame frame = new Frame("Gear Demo"); GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); - // Use debug pipeline - // canvas.setGL(new DebugGL(canvas.getGL())); - System.err.println("CANVAS GL IS: " + canvas.getGL().getClass().getName()); - System.err.println("CANVAS GLU IS: " + canvas.getGLU().getClass().getName()); - canvas.addGLEventListener(new GearRenderer()); frame.add(canvas); frame.setSize(300, 300); @@ -52,7 +47,11 @@ public class Gears { private boolean mouseRButtonDown = false; public void init(GLDrawable drawable) { + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); + System.err.println("INIT GL IS: " + gl.getClass().getName()); gl.setSwapInterval(1); diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index 13f3997..f97e875 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -161,12 +161,8 @@ public class HWShadowmapsSimple { class Listener implements GLEventListener { public void init(GLDrawable drawable) { - // 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())); - // } + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); @@ -378,12 +374,8 @@ public class HWShadowmapsSimple { class PbufferListener implements GLEventListener { public void init(GLDrawable drawable) { - // 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())); - // } + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); diff --git a/src/demos/jgears/JGears.java b/src/demos/jgears/JGears.java index 6adc528..ee0690c 100644 --- a/src/demos/jgears/JGears.java +++ b/src/demos/jgears/JGears.java @@ -17,11 +17,6 @@ public class JGears { Frame frame = new Frame("Gear Demo"); GLJPanel drawable = GLDrawableFactory.getFactory().createGLJPanel(new GLCapabilities()); - // Use debug pipeline - // drawable.setGL(new DebugGL(drawable.getGL())); - System.err.println("DRAWABLE GL IS: " + drawable.getGL().getClass().getName()); - System.err.println("DRAWABLE GLU IS: " + drawable.getGLU().getClass().getName()); - drawable.addGLEventListener(new GearRenderer()); frame.add(drawable); frame.setSize(300, 300); @@ -53,6 +48,9 @@ public class JGears { public void init(GLDrawable drawable) { + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); System.err.println("INIT GL IS: " + gl.getClass().getName()); diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java index 2307136..f562341 100755 --- a/src/demos/jrefract/JRefract.java +++ b/src/demos/jrefract/JRefract.java @@ -311,6 +311,9 @@ public class JRefract { "END\n"; public void init(GLDrawable drawable) { + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); float cc = 1.0f; @@ -892,6 +895,9 @@ public class JRefract { public void init(GLDrawable drawable) { + // Use debug pipeline + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); System.err.println("INIT GL IS: " + gl.getClass().getName()); diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java index 354a0c9..ccbd7a6 100644 --- a/src/demos/tess/Tess.java +++ b/src/demos/tess/Tess.java @@ -101,14 +101,10 @@ 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}, diff --git a/src/demos/testContextDestruction/TestContextDestruction.java b/src/demos/testContextDestruction/TestContextDestruction.java index 2edff00..3adb73c 100755 --- a/src/demos/testContextDestruction/TestContextDestruction.java +++ b/src/demos/testContextDestruction/TestContextDestruction.java @@ -178,12 +178,7 @@ public class TestContextDestruction { class Listener implements GLEventListener { public void init(GLDrawable drawable) { System.out.println("Listener.init()"); - // 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())); - } + drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java index e50c4d0..88f453a 100644 --- a/src/demos/testContextSharing/TestContextSharing.java +++ b/src/demos/testContextSharing/TestContextSharing.java @@ -97,12 +97,7 @@ public class TestContextSharing { class Listener implements GLEventListener { public void init(GLDrawable drawable) { - // 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())); - } + drawable.setGL(new DebugGL(drawable.getGL())); GL gl = drawable.getGL(); diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java index 6948d4e..5252f0e 100644 --- a/src/demos/vertexArrayRange/VertexArrayRange.java +++ b/src/demos/vertexArrayRange/VertexArrayRange.java @@ -219,8 +219,6 @@ public class VertexArrayRange { setFlag('i', true); // infinite viewer and light canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); - // canvas.setGL(new TraceGL(canvas.getGL(), System.err)); - // canvas.setGL(new DebugGL(canvas.getGL())); VARListener listener = new VARListener(); canvas.addGLEventListener(listener); @@ -280,6 +278,9 @@ public class VertexArrayRange { boolean exiting = false; public void init(GLDrawable drawable) { + // drawable.setGL(new TraceGL(drawable.getGL(), System.err)); + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java index 78e10a9..02bae92 100644 --- a/src/demos/vertexBufferObject/VertexBufferObject.java +++ b/src/demos/vertexBufferObject/VertexBufferObject.java @@ -214,8 +214,6 @@ public class VertexBufferObject { setFlag('i', true); // infinite viewer and light canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); - // canvas.setGL(new TraceGL(canvas.getGL(), System.err)); - // canvas.setGL(new DebugGL(canvas.getGL())); VBOListener listener = new VBOListener(); canvas.addGLEventListener(listener); @@ -274,6 +272,9 @@ public class VertexBufferObject { boolean exiting = false; public void init(GLDrawable drawable) { + // drawable.setGL(new TraceGL(drawable.getGL(), System.err)); + // drawable.setGL(new DebugGL(drawable.getGL())); + GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); |