From bafd9b99816f55c105230a59211caf13f0315910 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 23 Nov 2011 07:44:42 +0100 Subject: 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. --- src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableImpl.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java index 6b6ce9f9e..08efa75ca 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java @@ -52,7 +52,7 @@ public abstract class GLDrawableImpl implements GLDrawable { this.factory = factory; this.surface = comp; this.realized = realized; - this.requestedCapabilities = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getNativeGraphicsConfiguration().getRequestedCapabilities(); + this.requestedCapabilities = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getRequestedCapabilities(); } /** @@ -79,7 +79,7 @@ public abstract class GLDrawableImpl implements GLDrawable { } public final void swapBuffers() throws GLException { - GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)surface.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)surface.getGraphicsConfiguration().getChosenCapabilities(); if ( caps.getDoubleBuffered() ) { if(!surface.surfaceSwap()) { int lockRes = lockSurface(); // it's recursive, so it's ok within [makeCurrent .. release] @@ -114,7 +114,7 @@ public abstract class GLDrawableImpl implements GLDrawable { } public GLCapabilitiesImmutable getChosenGLCapabilities() { - return (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); + return (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities(); } public GLCapabilitiesImmutable getRequestedGLCapabilities() { -- cgit v1.2.3