summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-30 03:39:33 +0200
committerSven Gothel <[email protected]>2012-06-30 03:39:33 +0200
commitc50fca1b5df9ec3b76fada4dd5dd307bdece531a (patch)
tree321a39c578f92d479390a7b3ad47c21ec8260d52 /src/nativewindow
parent0d7c3ed619044723cf561df424eac9992e5281c7 (diff)
JAWTUtil/MacOSXWindowSystemInterface-pbuffer: Cleanup / More DEBUG info
JAWTUtil.getJAWT(..): - better local var names - one time init - add DEBUG trace JAWTUtil.<init>: - add offscreenLayer info MacOSXWindowSystemInterface-pbuffer.m: - remove warning: access of protected vars from outside class - better local var names - more DEBUG info (pbuffer texture)
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
index 8098bdb1b..36d7c3727 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
@@ -115,8 +115,8 @@ public class JAWTUtil {
JAWT jawt = JAWT.create();
// default queries
- boolean tryOffscreenLayer = false;
- boolean tryOnscreenLayer = true;
+ boolean tryOffscreenLayer;
+ boolean tryOnscreen;
int jawt_version_flags_offscreen = jawt_version_flags;
if(isOffscreenLayerRequired()) {
@@ -124,7 +124,7 @@ public class JAWTUtil {
if(Platform.OS_VERSION_NUMBER.compareTo(JAWTUtil.JAWT_MacOSXCALayerMinVersion) >= 0) {
jawt_version_flags_offscreen |= JAWTUtil.JAWT_MACOSX_USE_CALAYER;
tryOffscreenLayer = true;
- tryOnscreenLayer = false;
+ tryOnscreen = false;
} else {
throw new RuntimeException("OSX: Invalid version of Java ("+Platform.JAVA_VERSION_NUMBER+") / OS X ("+Platform.OS_VERSION_NUMBER+")");
}
@@ -135,9 +135,16 @@ public class JAWTUtil {
if(Platform.OS_TYPE == Platform.OSType.MACOS) {
jawt_version_flags_offscreen |= JAWTUtil.JAWT_MACOSX_USE_CALAYER;
tryOffscreenLayer = true;
+ tryOnscreen = true;
} else {
throw new InternalError("offscreen requested and supported, but n/a for: "+Platform.OS_TYPE);
}
+ } else {
+ tryOffscreenLayer = false;
+ tryOnscreen = true;
+ }
+ if(DEBUG) {
+ System.err.println("JAWTUtil.getJAWT(tryOffscreenLayer "+tryOffscreenLayer+", tryOnscreen "+tryOnscreen+")");
}
StringBuilder errsb = new StringBuilder();
@@ -147,7 +154,7 @@ public class JAWTUtil {
return jawt;
}
}
- if(tryOnscreenLayer) {
+ if(tryOnscreen) {
if(tryOffscreenLayer) {
errsb.append(", ");
}
@@ -260,6 +267,7 @@ public class JAWTUtil {
System.err.println("JAWTUtil: Is headless " + headlessMode);
int hints = ( null != desktophints ) ? desktophints.size() : 0 ;
System.err.println("JAWTUtil: AWT Desktop hints " + hints);
+ System.err.println("JAWTUtil: OffscreenLayer Supported: "+isOffscreenLayerSupported()+" - Required "+isOffscreenLayerRequired());
}
}