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/jogamp/opengl/egl | |
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/jogamp/opengl/egl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java | 2 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java index dbf35d68c..18d2f830d 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java @@ -228,7 +228,7 @@ public class EGLDisplayUtil { */ public static EGLGraphicsDevice eglCreateEGLGraphicsDevice(NativeSurface surface) { final long nativeDisplayID; - if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) { + if( NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false) ) { nativeDisplayID = surface.getSurfaceHandle(); // don't even ask .. } else { nativeDisplayID = surface.getDisplayHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index 50b480210..f2e836e3c 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -103,7 +103,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { EGLGraphicsConfigurationFactory.registerFactory(); // Check for other underlying stuff .. - if(NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) { + if(NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true)) { try { ReflectionUtil.createInstance("jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory", EGLDrawableFactory.class.getClassLoader()); } catch (JogampRuntimeException jre) { /* n/a .. */ } |