diff options
author | Sven Gothel <[email protected]> | 2012-03-06 09:59:34 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-06 09:59:34 +0100 |
commit | 3fbcf164be214f3c36bfc062e3ef63ddcc2e1687 (patch) | |
tree | 7172ac49435fc1cce26c82809b93322d1e72df0e /src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java | |
parent | efa70cd39e1a2ac18c3e8660f8d57e4569b19018 (diff) |
NativeWindow public* reorg 3/3 ; NativeVisualID -> VisualIDHolder incl. proper utilization.
- VisualIDHolder: Update documentation (Exception case, etc)
- NativeVisualID -> VisualIDHolder (public)
- incl. generic Comparator
- better doc and enum values
- VID_UNDEFINED == 0
- methods shall not throw exception, but return UNDEFINED
- CapabilitiesImmutable extends VisualIDHolder
- All Capabilties impl.
- use VID_UNDEFINED for undef. value
- use final private (immutable) fields
- AbstractGraphicsConfiguration extends VisualIDHolder
- X11 CreateDummyWindow takes (int) visualID
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java index 32055c5e0..b54089d13 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java @@ -36,15 +36,15 @@ package jogamp.opengl.egl; -import jogamp.nativewindow.NativeVisualID; -import jogamp.nativewindow.NativeVisualID.NVIDType; import jogamp.opengl.GLDynamicLookupHelper; import jogamp.opengl.GLDrawableImpl; import javax.media.nativewindow.*; -import javax.media.nativewindow.egl.*; +import javax.media.nativewindow.VisualIDHolder.VIDType; import javax.media.opengl.*; +import com.jogamp.nativewindow.egl.*; + public abstract class EGLDrawable extends GLDrawableImpl { protected boolean ownEGLDisplay = false; // for destruction protected boolean ownEGLSurface = false; // for destruction @@ -181,17 +181,8 @@ public abstract class EGLDrawable extends GLDrawableImpl { System.err.println(getThreadName() + ": Reusing chosenCaps: "+eglConfig); } } else { - final int nativeVisualID; - { - final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) aConfig.getChosenCapabilities(); - if(capsChosen instanceof NativeVisualID) { - nativeVisualID = ((NativeVisualID)capsChosen).getVisualID(NVIDType.NATIVE_ID); - } else { - nativeVisualID = -1; - } - } eglConfig = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic( - capsRequested, capsRequested, null, s, nativeVisualID); + capsRequested, capsRequested, null, s, aConfig.getVisualID(VIDType.NATIVE)); if (null == eglConfig) { throw new GLException("Couldn't create EGLGraphicsConfiguration from "+s); |