aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-25 18:30:25 +0100
committerSven Gothel <[email protected]>2012-02-25 18:30:25 +0100
commitc3098619080d10e5bec8b52999117002b16f3ff5 (patch)
tree0be5c16d29a17010f8c2799fa2abfe54fb96b581 /src/jogl/classes/javax/media/opengl
parent24f66881aed6bf1f6b79fe6d14ef3fdc0e254fab (diff)
X11/GLX: Query X Server whether GLX is available (X11/SharedResourceRunner) ; Minor cleanups.
Before gathering GLX details and actually instantiate a X11/GLX shared resource, we shall query whether GLX is actually available. Since GLX availability is being queried on the server side, more changes are required for the X11GLX* impl, eg. not using X11GLXGraphicsConfigurationFactory and fall back to X11GraphicsConfigurationFactory.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java4
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java19
2 files changed, 11 insertions, 12 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 9a921091c..26abc53ba 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -266,7 +266,7 @@ public abstract class GLDrawableFactory {
throw new InternalError("no default device");
}
if (GLProfile.DEBUG) {
- System.err.println("Info: GLDrawableFactory.validateDevice: using default device : "+device);
+ System.err.println("Info: "+getClass().getSimpleName()+".validateDevice: using default device : "+device);
}
}
@@ -274,7 +274,7 @@ public abstract class GLDrawableFactory {
// since even the default device may not be used by this factory.
if( !getIsDeviceCompatible(device) ) {
if (GLProfile.DEBUG) {
- System.err.println("Info: GLDrawableFactory.validateDevice: device not compatible : "+device);
+ System.err.println("Info: "+getClass().getSimpleName()+".validateDevice: device not compatible : "+device);
}
return null;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 83e8e0bbf..4d4b0d82c 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1519,10 +1519,10 @@ public class GLProfile {
boolean addedDesktopProfile = false;
boolean addedEGLProfile = false;
- boolean deviceIsDesktopCompatible = false;
- boolean deviceIsEGLCompatible = false;
- if( hasDesktopGLFactory && ( deviceIsDesktopCompatible = desktopFactory.getIsDeviceCompatible(device)) ) {
+ final boolean deviceIsDesktopCompatible = hasDesktopGLFactory && desktopFactory.getIsDeviceCompatible(device);
+
+ if( deviceIsDesktopCompatible ) {
// 1st pretend we have all Desktop and EGL profiles ..
computeProfileMap(device, true /* desktopCtxUndef*/, true /* esCtxUndef */);
@@ -1536,22 +1536,21 @@ public class GLProfile {
if(null != sharedResourceThread) {
initLock.removeOwner(sharedResourceThread);
}
- if(!desktopSharedCtxAvail) {
- hasDesktopGLFactory = false;
- }
if (DEBUG) {
System.err.println("GLProfile.initProfilesForDevice: "+device+": desktop Shared Ctx "+desktopSharedCtxAvail);
}
- if( hasDesktopGLFactory && !GLContext.getAvailableGLVersionsSet(device) ) {
+ if(!desktopSharedCtxAvail) {
+ hasDesktopGLFactory = false;
+ } else if( !GLContext.getAvailableGLVersionsSet(device) ) {
throw new InternalError("Available GLVersions not set");
}
addedDesktopProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* esCtxUndef */);
}
+ final boolean deviceIsEGLCompatible = hasEGLFactory && eglFactory.getIsDeviceCompatible(device);
+
// also test GLES1 and GLES2 on desktop, since we have implementations / emulations available
- if( hasEGLFactory && ( hasGLES2Impl || hasGLES1Impl ) &&
- ( deviceIsEGLCompatible = eglFactory.getIsDeviceCompatible(device)) ) {
-
+ if( deviceIsEGLCompatible && ( hasGLES2Impl || hasGLES1Impl ) ) {
// 1st pretend we have all EGL profiles ..
computeProfileMap(device, false /* desktopCtxUndef*/, true /* esCtxUndef */);