diff options
4 files changed, 12 insertions, 8 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java index 396580c1d..7af45d683 100755 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java @@ -50,7 +50,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { new EGLGraphicsConfigurationFactory(); // Check for other underlying stuff .. - if(NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(false))) { + if(NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) { try { NWReflection.createInstance("com.sun.opengl.impl.x11.glx.X11GLXGraphicsConfigurationFactory"); } catch (Throwable t) {} diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index cee721fa6..5a761119f 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -106,16 +106,14 @@ public abstract class GLDrawableFactory { } eglFactory = tmp; - nativeOSType = NativeWindowFactory.getNativeWindowType(false); + nativeOSType = NativeWindowFactory.getNativeWindowType(true); String factoryClassName = null; tmp = null; try { factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true, AccessController.getContext()); if (null == factoryClassName) { - if ( nativeOSType.equals(NativeWindowFactory.TYPE_EGL) ) { - // use egl*Factory .. - } else if ( nativeOSType.equals(NativeWindowFactory.TYPE_X11) ) { + if ( nativeOSType.equals(NativeWindowFactory.TYPE_X11) ) { factoryClassName = "com.sun.opengl.impl.x11.glx.X11GLXDrawableFactory"; } else if ( nativeOSType.equals(NativeWindowFactory.TYPE_WINDOWS) ) { factoryClassName = "com.sun.opengl.impl.windows.wgl.WindowsWGLDrawableFactory"; @@ -126,10 +124,16 @@ public abstract class GLDrawableFactory { factoryClassName = macosxFactoryClassNameCGL; } } else { - throw new GLException("Unsupported NativeWindow type: "+nativeOSType); + // may use egl*Factory .. + if (GLProfile.DEBUG) { + System.err.println("GLDrawableFactory.static - No Native OS Factory for: "+nativeOSType); + } } } if (null != factoryClassName) { + if (GLProfile.DEBUG) { + System.err.println("GLDrawableFactory.static - Native OS Factory for: "+nativeOSType+": "+factoryClassName); + } tmp = (GLDrawableFactory) NWReflection.createInstance(factoryClassName); } } catch (Throwable t) { diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NativeWindowFactoryImpl.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NativeWindowFactoryImpl.java index 424b44c8c..c94dab2f6 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/NativeWindowFactoryImpl.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NativeWindowFactoryImpl.java @@ -69,7 +69,7 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory { private NativeWindow getAWTNativeWindow(Object winObj, AbstractGraphicsConfiguration config) { if (nativeWindowConstructor == null) { try { - String osType = getNativeWindowType(false); + String osType = getNativeWindowType(true); String windowClassName = null; // We break compile-time dependencies on the AWT here to diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java index 1a9d4ac55..881499bec 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java @@ -74,7 +74,7 @@ public abstract class GraphicsConfigurationFactory { abstractGraphicsDeviceClass = javax.media.nativewindow.AbstractGraphicsDevice.class; - if (NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(false))) { + if (NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) { try { GraphicsConfigurationFactory factory = (GraphicsConfigurationFactory) NWReflection.createInstance("com.sun.nativewindow.impl.x11.X11GraphicsConfigurationFactory", new Object[] {}); |