From aed2c7f2919d8b6d3de5b1a1dd9ab260f0c3663c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 23 Jan 2012 00:55:44 +0100 Subject: Use glFlush() in favor of glFinish() for bug 548 and bug 533 fix - due to performance issues. Chris reported a better performance using glFlush() instead of glFinish() while maintaining stability in respect to the NV bug on OSX 10.6.8. Even though this is at release() where we would assume a passed GL sync point (swap buffers) the driver may involve a whole I/O roundtrip .. well. --- src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 522640294..ea30c59cf 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -537,10 +537,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl public boolean release(long ctx) { try { - gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze } catch (GLException gle) { if(DEBUG) { - System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFinish() catched exception:"); + System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFlush() catched exception:"); gle.printStackTrace(); } } @@ -648,10 +648,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl public boolean release(long ctx) { try { - gl.glFinish(); // w/o glFinish() OSX < 10.7 (NVidia driver) may freeze + gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze } catch (GLException gle) { if(DEBUG) { - System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFinish() catched exception:"); + System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFlush() catched exception:"); gle.printStackTrace(); } } -- cgit v1.2.3