diff options
author | Sven Gothel <[email protected]> | 2010-06-04 05:21:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-06-04 05:21:32 +0200 |
commit | 4512900ddcb9ce9a498411d257b1b6d6010ec006 (patch) | |
tree | ae9878c82cda41920f46ea639178f7d951d5af8f /src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | |
parent | 6bbf70d2f4a06b8aa0b100d83ed9aca6dd80040e (diff) |
JOGL: Unify library loading (impl and binding), incl. lookup ; GLAutoDrawable: dispose() calls only with created context.
- Using the EGL approach of DynamicLookupHelper,
now generalized in abstract GLDynamicLookupHelper,
DesktopGLDynamicLookupHelper and EGLGLDynamicLookupHelper.
The implementation of these are self contained.
- Sharing common code.
- Unifying implementation and binding loading,
as well as the function lookup within the impl libs.
- Removed DRIHack, since its no more required
due to the new DesktopGLDynamicLookupHelper.
- Removed compile time link to GL and GLU libs
- Removed redundant library OS functions from X11/WGL
bindings, GlueGen's common code is being used now.
- GLAutoDrawable: dispose() calls only with created context.
This cleans up stack traces in case of eventual bugs,
where context creation is not successful.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 416f0d694..0742587dd 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -234,7 +234,7 @@ public abstract class GLContextImpl extends GLContext { * </ul> * </ul><br> * - * Once at startup, ie triggered by the singleton {@link GLDrawableImpl} constructor, + * Once at startup, ie triggered by the singleton constructor of a {@link GLDrawableFactoryImpl} specialization, * calling {@link #createContextARB} will query all available OpenGL versions:<br> * <ul> * <li> <code>FOR ALL GL* DO</code>: @@ -396,6 +396,9 @@ public abstract class GLContextImpl extends GLContext { GLProfile glp = glCaps.getGLProfile(); long _context = 0; + if (DEBUG) { + System.err.println(getThreadName() + ": !!! createContextARB: mappedVersionsAvailableSet "+ mappedVersionsAvailableSet); + } if( !mappedVersionsAvailableSet ) { synchronized(mappedVersionsAvailableLock) { if( !mappedVersionsAvailableSet ) { @@ -405,6 +408,9 @@ public abstract class GLContextImpl extends GLContext { createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc createContextARBMapVersionsAvailable(2, true /* compat */); // GL2 mappedVersionsAvailableSet=true; + if (DEBUG) { + System.err.println(getThreadName() + ": !!! createContextARB: SET mappedVersionsAvailableSet "+ mappedVersionsAvailableSet); + } } } } @@ -497,6 +503,9 @@ public abstract class GLContextImpl extends GLContext { if(0!=_context) { destroyContextARBImpl(_context); mapVersionAvailable(reqMajor, reqProfile, major[0], minor[0], ctp); + if (DEBUG) { + System.err.println(getThreadName() + ": createContextARBMapVersionsAvailable: "+getGLVersionAvailable(reqMajor, reqProfile)); + } } } @@ -660,7 +669,7 @@ public abstract class GLContextImpl extends GLContext { /** Helper routine which resets a ProcAddressTable generated by the GLEmitter by looking up anew all of its function pointers. */ protected void resetProcAddressTable(Object table) { - ((ProcAddressTable)table).reset(getDrawableImpl().getDynamicLookupHelper() ); + ((ProcAddressTable)table).reset(getDrawableImpl().getGLDynamicLookupHelper() ); } /** @@ -743,7 +752,7 @@ public abstract class GLContextImpl extends GLContext { } catch (Exception e) {} } // dynamic function lookup at last incl name aliasing (not cached) - DynamicLookupHelper dynLookup = getDrawableImpl().getDynamicLookupHelper(); + DynamicLookupHelper dynLookup = getDrawableImpl().getGLDynamicLookupHelper(); String tmpBase = GLExtensionNames.normalizeVEN(GLExtensionNames.normalizeARB(glFunctionName, true), true); long addr = 0; int variants = GLExtensionNames.getFuncNamePermutationNumber(tmpBase); |