diff options
author | Sven Gothel <[email protected]> | 2010-11-15 03:53:22 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-15 03:53:22 +0100 |
commit | 35d1c40fe89311f88c7303930e172adcc5d6853a (patch) | |
tree | 383f74cbd782f32d194b7f893a5365fa86093ac7 /src/jogl/classes/com/jogamp/opengl/impl/egl | |
parent | 2c1a870f56f54df3e96d68e3d5dadee0bcae7cb5 (diff) |
NativeWindow AbstractGraphicsDevice: Add 'unitID' attribute and getUniqueID()
Preparation to support multiple devices on one machine,
hence adding the unitID a unique ID/index of the associated GPU, or GPU affinity.
Adding getUniqueID() to return a cached semantic unique string id for the device.
This was removed from the temp. impl in JOGL's GLContext, added unitID.
All other changes just adapt to the above.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/egl')
3 files changed, 4 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java index f9fcdb29c..81dcc12d5 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java @@ -166,7 +166,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { if (!EGL.eglInitialize(eglDisplay, null, null)) { throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError())); } - EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay); + EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_UNIT); DefaultGraphicsScreen s = new DefaultGraphicsScreen(e, aConfig.getScreen().getIndex()); GLCapabilities caps = (GLCapabilities) aConfig.getChosenCapabilities(); // yes, use the already choosen Capabilities (x11,win32,..) eglConfig = (EGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(e).chooseGraphicsConfiguration(caps, null, s); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java index c7e0a0417..3c8c4c98f 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java @@ -95,11 +95,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { public EGLDrawableFactory() { super(); - /** FIXME: - * find out the Windows semantics of a device connection {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection()} - * to actually use multiple devices. - */ - defaultDevice = new EGLGraphicsDevice(AbstractGraphicsDevice.DEFAULT_CONNECTION); + defaultDevice = new EGLGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT); } static class SharedResource { @@ -174,7 +170,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } protected GLContext createExternalGLContextImpl() { - AbstractGraphicsScreen absScreen = DefaultGraphicsScreen.createScreenDevice(AbstractGraphicsDevice.EXTERNAL_CONNECTION, 0); + AbstractGraphicsScreen absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_EGL); return new EGLExternalContext(absScreen); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java index 88e8a9ed1..c678707fc 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java @@ -282,7 +282,7 @@ public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactor if (!EGL.eglInitialize(eglDisplay, null, null)) { throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError())); } - EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay); + EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_UNIT); DefaultGraphicsScreen s = new DefaultGraphicsScreen(e, 0); EGLGraphicsConfiguration eglConfig = chooseGraphicsConfigurationStatic(caps, chooser, s); if (null == eglConfig) { |