diff options
author | Sven Gothel <[email protected]> | 2011-09-09 15:43:51 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-09 15:43:51 +0200 |
commit | 8def3e243401a0fe8ce606de6a54381a65626f15 (patch) | |
tree | f41e107ade84b5eedcd64063b997f791073d4117 /src/jogl/classes/jogamp/opengl/macosx | |
parent | 2083ba25be5ce9b55cc2f5a420f17c3bb5ff1750 (diff) |
*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
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 20 |
1 files changed, 13 insertions, 7 deletions
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() { |