summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media')
-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 */);