aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLProfile.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLProfile.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index f5f2e5389..0f502ce32 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1202,7 +1202,7 @@ public class GLProfile {
if(null != desktopFactory) {
DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(0);
if(null!=glLookupHelper) {
- hasDesktopGLFactory = glLookupHelper.hasGLBinding();
+ hasDesktopGLFactory = glLookupHelper.isLibComplete() && hasGL234Impl;
}
}
} catch (LinkageError le) {
@@ -1279,7 +1279,7 @@ public class GLProfile {
final boolean addedAnyProfile = addedDesktopProfile || addedEGLProfile ;
if(DEBUG) {
- System.err.println("GLProfile.init addedAnyProfile(e/d) "+addedAnyProfile+" ("+addedDesktopProfile+"/"+addedEGLProfile+")");
+ System.err.println("GLProfile.init addedAnyProfile(d/e) "+addedAnyProfile+" ("+addedDesktopProfile+"/"+addedEGLProfile+")");
System.err.println("GLProfile.init isAWTAvailable "+isAWTAvailable);
System.err.println("GLProfile.init hasDesktopGLFactory "+hasDesktopGLFactory);
System.err.println("GLProfile.init hasGL234Impl "+hasGL234Impl);
@@ -1324,14 +1324,16 @@ public class GLProfile {
boolean addedDesktopProfile = false;
boolean addedEGLProfile = false;
-
- if( hasDesktopGLFactory && desktopFactory.getIsDeviceCompatible(device)) {
+ boolean deviceIsDesktopCompatible = false;
+ boolean deviceIsEGLCompatible = false;
+
+ if( hasDesktopGLFactory && ( deviceIsDesktopCompatible = desktopFactory.getIsDeviceCompatible(device)) ) {
// 1st pretend we have all Desktop and EGL profiles ..
computeProfileMap(device, true /* desktopCtxUndef*/, true /* esCtxUndef */);
// Triggers eager initialization of share context in GLDrawableFactory for the device,
// hence querying all available GLProfiles
- boolean desktopSharedCtxAvail = desktopFactory.getIsSharedContextAvailable(device);
+ boolean desktopSharedCtxAvail = desktopFactory.getWasSharedContextCreated(device);
if (DEBUG) {
System.err.println("GLProfile.initProfilesForDevice: "+device+": desktop Shared Ctx "+desktopSharedCtxAvail);
}
@@ -1343,13 +1345,14 @@ public class GLProfile {
1, 5, GLContext.CTX_PROFILE_COMPAT|GLContext.CTX_OPTION_ANY);
}
addedDesktopProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* esCtxUndef */);
- } else if( null!=eglFactory && ( hasGLES2Impl || hasGLES1Impl ) && eglFactory.getIsDeviceCompatible(device)) {
+ } else if( hasEGLFactory && ( hasGLES2Impl || hasGLES1Impl ) &&
+ ( deviceIsEGLCompatible = eglFactory.getIsDeviceCompatible(device)) ) {
// 1st pretend we have all EGL profiles ..
computeProfileMap(device, false /* desktopCtxUndef*/, true /* esCtxUndef */);
// Triggers eager initialization of share context in GLDrawableFactory for the device,
// hence querying all available GLProfiles
- boolean eglSharedCtxAvail = eglFactory.getIsSharedContextAvailable(device);
+ boolean eglSharedCtxAvail = eglFactory.getWasSharedContextCreated(device);
if (DEBUG) {
System.err.println("GLProfile.initProfilesForDevice: "+device+": egl Shared Ctx "+eglSharedCtxAvail);
}
@@ -1371,7 +1374,13 @@ public class GLProfile {
} else {
setProfileMap(device, new HashMap()); // empty
if(DEBUG) {
- System.err.println("GLProfile: EGLFactory - Device is not available: "+device);
+ System.err.println("GLProfile: device could not be initialized: "+device);
+ System.err.println("GLProfile: compatible w/ desktop: "+deviceIsDesktopCompatible+
+ ", egl "+deviceIsEGLCompatible);
+ System.err.println("GLProfile: desktoplFactory "+desktopFactory);
+ System.err.println("GLProfile: eglFactory "+eglFactory);
+ System.err.println("GLProfile: hasGLES1Impl "+hasGLES1Impl);
+ System.err.println("GLProfile: hasGLES2Impl "+hasGLES2Impl);
}
}