summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java13
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java8
5 files changed, 11 insertions, 22 deletions
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"));