diff options
Diffstat (limited to 'src')
6 files changed, 13 insertions, 26 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 60ca7a7f4..9d99a32ff 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -792,10 +792,8 @@ public abstract class GLContext { } deviceVersionsAvailableSet.add(devKey); if (GLContextImpl.DEBUG) { - String msg = getThreadName() + ": !!! createContextARB: SET mappedVersionsAvailableSet "+devKey; - // Throwable t = new Throwable(msg); - // t.printStackTrace(); - System.err.println(msg); + System.err.println(getThreadName() + ": !!! createContextARB: SET mappedVersionsAvailableSet "+devKey); + // Thread.dumpStack(); } } } diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index 2deae65fb..0ec913e31 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -36,6 +36,7 @@ package jogamp.opengl.egl; import javax.media.opengl.*; + import jogamp.opengl.*; import com.jogamp.gluegen.runtime.ProcAddressTable; @@ -183,7 +184,6 @@ public abstract class EGLContext extends GLContextImpl { throw new GLException("Error creating OpenGL context: eglDisplay "+toHexString(eglDisplay)+ ", eglConfig "+config+", "+glProfile+", shareWith "+toHexString(shareWith)+", error "+toHexString(EGL.eglGetError())); } - GLContextShareSet.contextCreated(this); if (DEBUG) { System.err.println(getThreadName() + ": !!! Created OpenGL context 0x" + Long.toHexString(contextHandle) + diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index fb9c93000..79d96bdb6 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -136,6 +136,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { return true; // via mappings (X11/WGL/.. -> EGL) we shall be able to handle all types. } + /** private boolean isEGLContextAvailable(EGLGraphicsDevice sharedDevice, String profile) { boolean madeCurrent = false; final GLCapabilities caps = new GLCapabilities(GLProfile.get(profile)); @@ -163,9 +164,9 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { drawable.destroy(); } return madeCurrent; - } + } */ - private SharedResource getOrCreateShared(AbstractGraphicsDevice adevice) { + /* package */ SharedResource getOrCreateEGLSharedResource(AbstractGraphicsDevice adevice) { String connection = adevice.getConnection(); SharedResource sr; synchronized(sharedMap) { @@ -200,7 +201,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) { - SharedResource sr = getOrCreateShared(device); + SharedResource sr = getOrCreateEGLSharedResource(device); if(null!=sr) { return sr.wasES1ContextAvailable() || sr.wasES2ContextAvailable(); } @@ -212,17 +213,13 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) { - SharedResource sr = getOrCreateShared(device); + SharedResource sr = getOrCreateEGLSharedResource(device); if(null!=sr) { return sr.getDevice(); } return null; } - SharedResource getOrCreateSharedResource(AbstractGraphicsDevice device) { - return (SharedResource) getOrCreateShared(device); - } - public GLDynamicLookupHelper getGLDynamicLookupHelper(int esProfile) { if (2==esProfile) { if(null==eglES2DynamicLookupHelper) { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java index 8c1cf882c..74f7d884b 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java @@ -101,7 +101,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact } protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(EGLDrawableFactory factory, AbstractGraphicsDevice device) { - EGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResource(device); + EGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateEGLSharedResource(device); if(null == sharedResource) { throw new GLException("Shared resource for device n/a: "+device); } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java index b95b7edbf..8f2ec74af 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java @@ -244,12 +244,8 @@ public class WindowsWGLContext extends GLContextImpl { WGL.wglMakeCurrent(0, 0); WGL.wglDeleteContext(ctx); ctx = 0; - } else { - if (DEBUG) { - System.err.println(getThreadName() + ": createContextARBImpl: OK "+getGLVersion(major, minor, ctp, "@creation")+", share "+share+", direct "+direct); - } - // the following is issued by the caller 'GLContextImpl.createContextARB()' - // setGLFunctionAvailability(true, major, minor, ctp); + } else if (DEBUG) { + System.err.println(getThreadName() + ": createContextARBImpl: OK "+getGLVersion(major, minor, ctp, "@creation")+", share "+share+", direct "+direct); } } else if (DEBUG) { System.err.println(getThreadName() + ": createContextARBImpl: NO "+getGLVersion(major, minor, ctp, "@creation")); diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java index 5203d4ab5..904379058 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java @@ -264,12 +264,8 @@ public abstract class X11GLXContext extends GLContextImpl { glXMakeContextCurrent(display, 0, 0, 0); GLX.glXDestroyContext(display, ctx); ctx = 0; - } else { - if (DEBUG) { - System.err.println(getThreadName() + ": createContextARBImpl: OK "+getGLVersion(major, minor, ctp, "@creation")+", share "+share+", direct "+direct); - } - // the following is issued by the caller 'GLContextImpl.createContextARB()' - // setGLFunctionAvailability(true, major, minor, ctp); + } else if (DEBUG) { + System.err.println(getThreadName() + ": createContextARBImpl: OK "+getGLVersion(major, minor, ctp, "@creation")+", share "+share+", direct "+direct); } } else if (DEBUG) { System.err.println(getThreadName() + ": createContextARBImpl: NO "+getGLVersion(major, minor, ctp, "@creation")); |