summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextImpl.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/GLContextImpl.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/GLContextImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 58f1bf1cd..a79ef32a3 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -454,7 +454,7 @@ public abstract class GLContextImpl extends GLContext {
boolean newCreated = false;
if (!isCreated()) {
GLProfile.initProfiles(
- getGLDrawable().getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice());
+ getGLDrawable().getNativeSurface().getGraphicsConfiguration().getScreen().getDevice());
newCreated = createImpl(); // may throws exception if fails!
if (DEBUG) {
if(newCreated) {
@@ -548,7 +548,7 @@ public abstract class GLContextImpl extends GLContext {
*/
protected final long createContextARB(long share, boolean direct)
{
- AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice device = config.getScreen().getDevice();
GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
GLProfile glp = glCaps.getGLProfile();
@@ -654,7 +654,7 @@ public abstract class GLContextImpl extends GLContext {
}
}
if(0!=_context) {
- AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
+ AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
if( isExtensionAvailable("GL_ARB_ES2_compatibility") ) {
ctp |= CTX_PROFILE_ES2_COMPAT;
}
@@ -873,7 +873,7 @@ public abstract class GLContextImpl extends GLContext {
updateGLXProcAddressTable();
- AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
final int ctxImplBits = drawable.getChosenGLCapabilities().getHardwareAccelerated() ? GLContext.CTX_IMPL_ACCEL_HARD : GLContext.CTX_IMPL_ACCEL_SOFT;
contextFQN = getContextFQN(adevice, major, minor, ctxProfileBits, ctxImplBits);