diff options
author | Sven Gothel <[email protected]> | 2012-08-18 14:52:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-08-18 14:52:32 +0200 |
commit | c5835a2e19a84cb08957d6c742e4334d578c3c66 (patch) | |
tree | 2d7b50355cbbf3a4e19ab5922f8d478316e75110 /src/jogl/classes/javax | |
parent | a694cadca4ab72481e777222f412f006f973f77e (diff) |
NativeWindowFactory.getNativeWindowType(..): Return canonical string representation allowing proper use of ref. comparison '==', instead of 'String.equals()'
Also make NativeWindowFactory's instances of nativeWindowingTypePure and nativeWindowingTypeCustom static final.
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index 9a0d2cb99..fbdc51022 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -123,16 +123,16 @@ public abstract class GLDrawableFactory { private static final void initSingletonImpl() { registerFactoryShutdownHook(); - final String nativeOSType = NativeWindowFactory.getNativeWindowType(true); + final String nwt = NativeWindowFactory.getNativeWindowType(true); GLDrawableFactory tmp = null; String factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true); ClassLoader cl = GLDrawableFactory.class.getClassLoader(); if (null == factoryClassName) { - if ( nativeOSType.equals(NativeWindowFactory.TYPE_X11) ) { + if ( nwt == NativeWindowFactory.TYPE_X11 ) { factoryClassName = "jogamp.opengl.x11.glx.X11GLXDrawableFactory"; - } else if ( nativeOSType.equals(NativeWindowFactory.TYPE_WINDOWS) ) { + } else if ( nwt == NativeWindowFactory.TYPE_WINDOWS ) { factoryClassName = "jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory"; - } else if ( nativeOSType.equals(NativeWindowFactory.TYPE_MACOSX) ) { + } else if ( nwt == NativeWindowFactory.TYPE_MACOSX ) { if(ReflectionUtil.isClassAvailable(macosxFactoryClassNameAWTCGL, cl)) { factoryClassName = macosxFactoryClassNameAWTCGL; } else { @@ -141,19 +141,19 @@ public abstract class GLDrawableFactory { } else { // may use egl*Factory .. if (GLProfile.DEBUG) { - System.err.println("GLDrawableFactory.static - No native OS Factory for: "+nativeOSType+"; May use EGLDrawableFactory, if available." ); + System.err.println("GLDrawableFactory.static - No native Windowing Factory for: "+nwt+"; May use EGLDrawableFactory, if available." ); } } } if (null != factoryClassName) { if (GLProfile.DEBUG) { - System.err.println("GLDrawableFactory.static - Native OS Factory for: "+nativeOSType+": "+factoryClassName); + System.err.println("GLDrawableFactory.static - Native OS Factory for: "+nwt+": "+factoryClassName); } try { tmp = (GLDrawableFactory) ReflectionUtil.createInstance(factoryClassName, cl); } catch (JogampRuntimeException jre) { if (GLProfile.DEBUG) { - System.err.println("Info: GLDrawableFactory.static - Native Platform: "+nativeOSType+" - not available: "+factoryClassName); + System.err.println("Info: GLDrawableFactory.static - Native Platform: "+nwt+" - not available: "+factoryClassName); jre.printStackTrace(); } } |