From 8def3e243401a0fe8ce606de6a54381a65626f15 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 9 Sep 2011 15:43:51 +0200 Subject: *GLContext: resetStates(); getPlatformExtensionsString(); GLX/WGL NV_swap_group support; setSwapInterval(); resetStates() - fixes a bug where X11GLXContext impl. resetState() !! - marked all with @Override tag - ensured super.resetStates() is called at end (oops) getPlatformExtensionsStringImpl()* - fixes a bug where X11GLXContext overrides GLContext cached GLX extension string query - marked 'final' in GLContext to avoid bugs - using abstract 'getPlatformExtensionsStringImpl()' called by ExtensionAvailabilityCache Add premiliry GLX/WGL NV_swap_group support - thought it might be a solution to sync swap of 2 windows - none of my drivers/platforms support it, event though extension is avail on Linux Promote setSwapInterval() (1 up) - bumped above API up to public GLContext - those extension should not spam the GL interfaces .. hmm --- .../jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/macosx') diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index f6fe16eae..150a5e105 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -51,7 +51,7 @@ import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; public abstract class MacOSXCGLContext extends GLContextImpl { protected boolean isNSContext; - private CGLExt cglExt; + private CGLExt _cglExt; // Table that holds the addresses of the native C-language entry points for // CGL extension functions. private CGLExtProcAddressTable cglExtProcAddressTable; @@ -61,6 +61,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl super(drawable, shareWith); } + @Override + protected void resetStates() { + isNSContext = false; + // no inner state _cglExt = null; + super.resetStates(); + } + public Object getPlatformGLExtensions() { return getCGLExt(); } @@ -68,10 +75,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl protected boolean isNSContext() { return isNSContext; } public CGLExt getCGLExt() { - if (cglExt == null) { - cglExt = new CGLExtImpl(this); + if (_cglExt == null) { + _cglExt = new CGLExtImpl(this); } - return cglExt; + return _cglExt; } public final ProcAddressTable getPlatformExtProcAddressTable() { @@ -255,9 +262,8 @@ public abstract class MacOSXCGLContext extends GLContextImpl } } - public String getPlatformExtensionsString() - { - return ""; + protected final StringBuffer getPlatformExtensionsStringImpl() { + return new StringBuffer(); } protected void swapBuffers() { -- cgit v1.2.3