aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-05 17:46:56 +0200
committerSven Gothel <[email protected]>2011-08-05 17:46:56 +0200
commit0f8a1a0d7c6ea2f712f902b57e37cbedc46b1387 (patch)
tree3a901b00cd8f0d89a7505681e370da7a74238b8b
parente04ec76678486f1b251ed4d907a924d53aafce52 (diff)
debug verbosity ; adaption of gluegen fix of DynamicLibraryBundle
fix debug log in case no device has been initialized use gluegen's fix of DynamicLibraryBundle.isGlueLibComplete() - see gluegen commit 6281499e53555fd8ab26345ffce4c4d09bf57a09
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java19
-rw-r--r--src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java7
-rw-r--r--src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java4
3 files changed, 14 insertions, 16 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index f5f2e5389..5882046ec 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) {
@@ -1324,8 +1324,10 @@ 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 */);
@@ -1343,7 +1345,8 @@ 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 */);
@@ -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);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
index dc33541e6..e548ad624 100644
--- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
@@ -32,21 +32,14 @@ import java.util.List;
import java.util.ArrayList;
public abstract class DesktopGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundleInfo {
- private static int posGlueLibGLDESKTOP;
private static List/*<String>*/ glueLibNames;
static {
glueLibNames = new ArrayList();
glueLibNames.addAll(getGlueLibNamesPreload());
-
- posGlueLibGLDESKTOP = glueLibNames.size();
glueLibNames.add("jogl_desktop");
}
- public static final int getGlueLibPosGLDESKTOP() {
- return posGlueLibGLDESKTOP;
- }
-
public DesktopGLDynamicLibraryBundleInfo() {
super();
}
diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
index 4879c617e..2d2d1c536 100644
--- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
+++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
@@ -39,10 +39,6 @@ public class DesktopGLDynamicLookupHelper extends GLDynamicLookupHelper {
public DesktopGLDynamicLibraryBundleInfo getDesktopGLBundleInfo() { return (DesktopGLDynamicLibraryBundleInfo) getBundleInfo(); }
- public boolean hasGLBinding() {
- return isToolLibLoaded() && isGlueLibLoaded(DesktopGLDynamicLibraryBundleInfo.getGlueLibPosGLDESKTOP());
- }
-
public synchronized boolean loadGLULibrary() {
/** hacky code .. where all platform GLU libs are tried ..*/
if(null==gluLib) {