aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
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/x11/glx/X11GLXContext.java
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/x11/glx/X11GLXContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 904379058..51cd018f4 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -127,7 +127,7 @@ public abstract class X11GLXContext extends GLContextImpl {
private final void initGLXVersion() {
if(null == glXVersion) {
- X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
X11GraphicsDevice device = (X11GraphicsDevice) config.getScreen().getDevice();
glXVersion = X11GLXDrawableFactory.getGLXVersion(device);
@@ -179,7 +179,7 @@ public abstract class X11GLXContext extends GLContextImpl {
}
protected void destroyContextARBImpl(long ctx) {
- X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
long display = config.getScreen().getDevice().getHandle();
glXMakeContextCurrent(display, 0, 0, 0);
@@ -239,7 +239,7 @@ public abstract class X11GLXContext extends GLContextImpl {
attribs.put(ctx_arb_attribs_idx_flags + 1, flags);
}
- X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice device = config.getScreen().getDevice();
long display = device.getHandle();
@@ -289,7 +289,7 @@ public abstract class X11GLXContext extends GLContextImpl {
isDirect = false; // fall back
X11GLXDrawableFactory factory = (X11GLXDrawableFactory)drawable.getFactoryImpl();
- X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice device = config.getScreen().getDevice();
X11GLXContext sharedContext = (X11GLXContext) factory.getOrCreateSharedContextImpl(device);
long display = device.getHandle();
@@ -460,7 +460,7 @@ public abstract class X11GLXContext 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 = "GLX-"+adevice.getUniqueID();
if (DEBUG) {
@@ -526,14 +526,14 @@ public abstract class X11GLXContext extends GLContextImpl {
if (glExtensionName.equals("GL_ARB_pbuffer") ||
glExtensionName.equals("GL_ARB_pixel_format")) {
return getGLDrawable().getFactory().canCreateGLPbuffer(
- drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice() );
+ drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice() );
}
return super.isExtensionAvailable(glExtensionName);
}
@Override
protected void setSwapIntervalImpl(int interval) {
- X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
if(!glCaps.isOnscreen()) return;