aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
authorsg215889 <[email protected]>2009-07-28 20:20:02 -0700
committersg215889 <[email protected]>2009-07-28 20:20:02 -0700
commitce34e2286a1ef4f8be874144e25c0268a1abf90f (patch)
treec6039233aa5e4851c40eb789dc7bb24609c3ad15 /src/jogl/classes/javax/media
parent6db7512b4dc3c97e31937e3bd226b2b33cc53268 (diff)
Use getNativeWindowType(custom=true) for factory selection; Don't fail is non native OS factory is available
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java14
1 files changed, 9 insertions, 5 deletions
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) {