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/windows/wgl | |
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/windows/wgl')
5 files changed, 8 insertions, 12 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java index 9917ea901..5ac937be8 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLContext.java @@ -75,7 +75,7 @@ public class WindowsExternalWGLContext extends WindowsWGLContext { throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat"); } - AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(); + AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.create(hdc, pfdID, glp, aScreen, true, true); ProxySurface ns = new ProxySurface(cfg); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java index 19fe8f03c..ec0bd7c7a 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsExternalWGLDrawable.java @@ -61,7 +61,7 @@ public class WindowsExternalWGLDrawable extends WindowsWGLDrawable { throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat"); } - AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(); + AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.create(hdc, pfdID, glp, aScreen, true, true); ProxySurface ns = new ProxySurface(cfg); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java index 850cf5542..64dd0eb46 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java @@ -87,11 +87,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { } catch (JogampRuntimeException jre) { /* n/a .. */ } } - /** FIXME: - * find out the Windows semantics of a device connection {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection()} - * to actually use multiple devices. - */ - defaultDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_CONNECTION); + defaultDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT); } static class SharedResource { @@ -261,7 +257,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { } protected final NativeSurface createOffscreenSurfaceImpl(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int width, int height) { - AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault(); + AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); ProxySurface ns = new ProxySurface(WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic( capabilities, chooser, screen) ); ns.setSize(width, height); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index d34467fb1..372630446 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -65,7 +65,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio caps.setPBuffer (usePBuffer); if(null==absScreen) { - absScreen = DefaultGraphicsScreen.createScreenDevice(AbstractGraphicsDevice.DEFAULT_CONNECTION, 0); + absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); } return new WindowsWGLGraphicsConfiguration(absScreen, caps, caps, WindowsWGLGraphicsConfiguration.GLCapabilities2PFD(caps), -1, null); @@ -75,7 +75,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) { if(null==absScreen) { - absScreen = DefaultGraphicsScreen.createScreenDevice(AbstractGraphicsDevice.DEFAULT_CONNECTION, 0); + absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); } GLCapabilities caps2 = (GLCapabilities) caps.clone(); if(!caps2.isOnscreen()) { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java index 26704acf3..48850440d 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java @@ -62,7 +62,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GraphicsConfigura } if(null==absScreen) { - absScreen = AWTGraphicsScreen.createScreenDevice(-1); + absScreen = AWTGraphicsScreen.createScreenDevice(-1, AbstractGraphicsDevice.DEFAULT_UNIT); } AWTGraphicsScreen awtScreen = (AWTGraphicsScreen) absScreen; device = ((AWTGraphicsDevice)awtScreen.getDevice()).getGraphicsDevice(); @@ -88,7 +88,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GraphicsConfigura long displayHandle = 0; - WindowsGraphicsDevice winDevice = new WindowsGraphicsDevice(); + WindowsGraphicsDevice winDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT); DefaultGraphicsScreen winScreen = new DefaultGraphicsScreen(winDevice, awtScreen.getIndex()); if(DEBUG) { System.err.println("WindowsAWTWGLGraphicsConfigurationFactory: made "+winScreen); |