aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/windows
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-23 07:44:42 +0100
committerSven Gothel <[email protected]>2011-11-23 07:44:42 +0100
commitbafd9b99816f55c105230a59211caf13f0315910 (patch)
treec805b6385938e2014f504d8d0d025ac799b79c44 /src/jogl/classes/jogamp/opengl/windows
parent645a863ee5a8efa915dd43abd608248e8cbc13cd (diff)
NativeSurface's getGraphicsConfiguration() returns the native (delegated) AbstractGraphicsConfiguration, if delegation is used.
This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration() to NativeSurface implementations and hence reduces complexity. NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration is controlled via get/set method avoiding flawed usage (read/write), since read access shall return the delegated AbstractGraphicsConfiguration, if used.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java2
8 files changed, 10 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
index aa5da9f2b..9e3f71513 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
@@ -83,7 +83,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
if(DEBUG) {
System.err.println("WindowsBitmapWGLDrawable (1): "+ns);
}
- WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getRequestedCapabilities();
int width = getWidth();
int height = getHeight();
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java
index 966ad867f..2980c22c5 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java
@@ -63,7 +63,7 @@ public class WindowsDummyWGLDrawable extends WindowsWGLDrawable {
throw new GLException("WindowsDummyWGLDrawable: surface not ready (lockSurface)");
}
try {
- WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
config.updateGraphicsConfiguration(factory, ns, null);
if (DEBUG) {
System.err.println("!!! WindowsDummyWGLDrawable: "+config);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
index cda839967..c7becfdaf 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -117,7 +117,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
}
private void createPbuffer() {
- WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) getNativeSurface().getGraphicsConfiguration();
SharedResource sharedResource = ((WindowsWGLDrawableFactory)factory).getOrCreateSharedResource(config.getScreen().getDevice());
long parentHdc = sharedResource.getDrawable().getNativeSurface().getSurfaceHandle();
WGLExt wglExt = sharedResource.getContext().getWGLExt();
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index 8f2ec74af..90b7fa949 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -118,7 +118,7 @@ public class WindowsWGLContext extends GLContextImpl {
public final boolean isGLReadDrawableAvailable() {
if(!wglGLReadDrawableAvailableSet && null != getWGLExtProcAddressTable()) {
WindowsWGLDrawableFactory factory = (WindowsWGLDrawableFactory)drawable.getFactoryImpl();
- AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice device = config.getScreen().getDevice();
switch( factory.isReadDrawableAvailable(device) ) {
case 1:
@@ -259,7 +259,7 @@ public class WindowsWGLContext extends GLContextImpl {
*/
protected boolean createImpl() {
WindowsWGLDrawableFactory factory = (WindowsWGLDrawableFactory)drawable.getFactoryImpl();
- AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice device = config.getScreen().getDevice();
WindowsWGLContext sharedContext = (WindowsWGLContext) factory.getOrCreateSharedContextImpl(device);
GLCapabilitiesImmutable glCaps = drawable.getChosenGLCapabilities();
@@ -394,7 +394,7 @@ public class WindowsWGLContext extends GLContextImpl {
}
protected final void updateGLXProcAddressTable() {
- final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
final String key = "WGL-"+adevice.getUniqueID();
if (DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
index fe446e8fe..2e0f6b848 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
@@ -68,7 +68,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
}
NativeSurface ns = getNativeSurface();
- WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
config.updateGraphicsConfiguration(getFactory(), ns, null);
if (DEBUG) {
System.err.println("!!! WindowsWGLDrawable.setRealized(true): "+config);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 5a1f997a6..277adf6e9 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -429,7 +429,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
if (target == null) {
throw new IllegalArgumentException("Null target");
}
- AbstractGraphicsConfiguration config = target.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsConfiguration config = target.getGraphicsConfiguration();
GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
if(!chosenCaps.isPBuffer()) {
return new WindowsBitmapWGLDrawable(this, target);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index d472d0358..2fcded885 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -149,7 +149,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
* @see #isDetermined()
*/
public final void preselectGraphicsConfiguration(GLDrawableFactory factory, int[] pfdIDs) {
- AbstractGraphicsDevice device = getNativeGraphicsConfiguration().getScreen().getDevice();
+ AbstractGraphicsDevice device = getScreen().getDevice();
WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(chooser, factory, device, this, pfdIDs);
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index a485f8ce8..34502648d 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -189,7 +189,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
if (0 == hdc) {
throw new GLException("Error: HDC is null");
}
- WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) ns.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) ns.getGraphicsConfiguration();
if( !config.isExternal() ) {
if( !config.isDetermined() ) {