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 --- src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/javax') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index 1a18a60f8..48a8fe9e0 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -126,7 +126,7 @@ public abstract class GLDrawableFactory { } else { // may use egl*Factory .. if (GLProfile.DEBUG) { - System.err.println("GLDrawableFactory.static - No Native OS Factory for: "+nativeOSType); + System.err.println("GLDrawableFactory.static - No native OS Factory for: "+nativeOSType+"; May use EGLDrawableFactory, if available." ); } } } @@ -157,11 +157,16 @@ public abstract class GLDrawableFactory { protected static GLDrawableFactory getFactoryImpl(String glProfileImplName) throws GLException { if ( GLProfile.usesNativeGLES(glProfileImplName) ) { - if(null==eglFactory) throw new GLException("GLDrawableFactory unavailable for EGL: "+glProfileImplName); + if(null==eglFactory) throw new GLException("EGLDrawableFactory unavailable: "+glProfileImplName); return eglFactory; } - if(null==nativeOSFactory) throw new GLException("GLDrawableFactory unavailable for Native Platform "+nativeOSType); - return nativeOSFactory; + if(null!=nativeOSFactory) { + return nativeOSFactory; + } + if(null!=eglFactory) { + return eglFactory; + } + throw new GLException("No native platform GLDrawableFactory, nor EGLDrawableFactory available: "+glProfileImplName); } /** Shuts down this GLDrawableFactory, releasing resources -- cgit v1.2.3