From 9fd3c095ce2117c3cb67169c97531cac78ab04c4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 2 Oct 2009 10:18:22 -0700 Subject: NativeWindowFactory: - If property 'nativewindow.ws.name' is set, use it as the custom windowing type returned by getNativeWindowType(true) NEWT: - Using NativeWindowFactory's property 'nativewindow.ws.name' as a package name for custom NEWT windowing imlementations, ie: -Dnativewindow.ws.name=com.sun.javafx.newt.intel.gdl -Dnativewindow.ws.name=com.sun.javafx.newt.broadcom.egl This allows far more flexibility to add custom impl. - Add Intel-GDL, define property 'useIntelGDL' to build the native part. Intel GDL is impl in the package 'com.sun.javafx.newt.intel.gdl' JOGL: - All impl. of 'createGLDrawable(..)', which were actually creating onscreen drawable only, were renamed to 'createOnscreenDrawable(..)'. - GLDrawableFactoryImpl impl. 'createGLDrawable(..)' now and dispatches to the actual create* methods in respect to the Capabilities, ie onscreen, pbuffer and offscreen. - GLDrawableFactory: - If using a native ES profile -> EGLDrawableFactory - If existing native OS factory -> Use that .. - Else -> Use EGLDrawableFactory, if available --- .../classes/javax/media/nativewindow/NativeWindowFactory.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/nativewindow/classes/javax') diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index cbd485649..0710bc24c 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -85,7 +85,7 @@ public abstract class NativeWindowFactory { } else if (osNameLowerCase.startsWith("wind")) { return TYPE_WINDOWS; } else if (osNameLowerCase.startsWith("mac os x") || - osNameLowerCase.startsWith("darwin")) { + osNameLowerCase.startsWith("darwin")) { return TYPE_MACOSX; } else if (osNameLowerCase.equals("awt")) { return TYPE_AWT; @@ -100,12 +100,14 @@ public abstract class NativeWindowFactory { // Gather the windowing OS first AccessControlContext acc = AccessController.getContext(); nativeOSNamePure = Debug.getProperty("os.name", false, acc); + nativeWindowingTypePure = _getNativeWindowingType(nativeOSNamePure.toLowerCase()); nativeOSNameCustom = Debug.getProperty("nativewindow.ws.name", true, acc); if(null==nativeOSNameCustom||nativeOSNameCustom.length()==0) { - nativeOSNameCustom = nativeOSNamePure; + nativeOSNameCustom = nativeOSNamePure; + nativeWindowingTypeCustom = nativeWindowingTypePure; + } else { + nativeWindowingTypeCustom = nativeOSNameCustom; } - nativeWindowingTypePure = _getNativeWindowingType(nativeOSNamePure.toLowerCase()); - nativeWindowingTypeCustom = _getNativeWindowingType(nativeOSNameCustom.toLowerCase()); registeredFactories = Collections.synchronizedMap(new HashMap()); -- cgit v1.2.3