diff options
author | First Last <[email protected]> | 2005-06-16 23:02:03 +0000 |
---|---|---|
committer | First Last <[email protected]> | 2005-06-16 23:02:03 +0000 |
commit | 9d278dff86c07218ff2616745381ccc2689f8ea5 (patch) | |
tree | 46e3493919362a74f1d2e03e2622127eed0b9856 /src/demos/vertexArrayRange/VertexArrayRange.java | |
parent | 9d209d3b6ae12604e666d7b655bd1f19e70ee48b (diff) |
This commit was manufactured by cvs2svn to create branch 'JSR-231'.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@93 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/vertexArrayRange/VertexArrayRange.java')
-rw-r--r-- | src/demos/vertexArrayRange/VertexArrayRange.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java index 5252f0e..3534c64 100644 --- a/src/demos/vertexArrayRange/VertexArrayRange.java +++ b/src/demos/vertexArrayRange/VertexArrayRange.java @@ -219,6 +219,8 @@ 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); @@ -278,14 +280,17 @@ 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(); // Try and disable synch-to-retrace for fastest framerate - gl.setSwapInterval(0); + if (gl.isFunctionAvailable("wglSwapIntervalEXT")) { + System.err.println("wglSwapIntervalEXT available; disabling sync-to-refresh for best framerate"); + gl.wglSwapIntervalEXT(0); + } + else { + System.err.println("wglSwapIntervalEXT not available; cannot disable sync-to-refresh"); + } try { ensurePresent("glVertexArrayRangeNV"); |