aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/x11
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-09-15 00:54:15 +0200
committerSven Gothel <[email protected]>2010-09-15 00:54:15 +0200
commit2496959ec796252cef624e374b2a7ffeadfb5cc9 (patch)
tree60420cd994816070efc7e4f841ca2db2a3f3ddef /src/jogl/classes/com/jogamp/opengl/impl/x11
parent63be4a40aa6ecfe9fbc6585acccbc6f6f6689377 (diff)
parentdc9191f1733960d8a035b5fb8c5f8314f54a0ca7 (diff)
Merge branch 'master' into newt_display_unkey_thread
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/x11')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java53
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXContext.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java14
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java9
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDynamicLibraryBundleInfo.java56
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java53
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXContext.java22
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java9
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXDrawable.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java12
14 files changed, 87 insertions, 154 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java
index ddcac9628..46bc9460d 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/GLXUtil.java
@@ -34,7 +34,6 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.opengl.*;
-import com.jogamp.nativewindow.impl.x11.*;
public class GLXUtil {
public static String getExtension(long display) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java
index afd005bb4..475f413ba 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java
@@ -1,41 +1,35 @@
-/*
- * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
*
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
*
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Neither the name Sven Gothel or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
*/
-
+
package com.jogamp.opengl.impl.x11.glx;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
import com.jogamp.nativewindow.impl.*;
import com.jogamp.nativewindow.impl.x11.*;
@@ -57,7 +51,6 @@ public class X11DummyGLXDrawable extends X11OnscreenGLXDrawable {
NullWindow nw = (NullWindow) getNativeWindow();
X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)nw.getGraphicsConfiguration().getNativeGraphicsConfiguration();
- GLCapabilities caps = (GLCapabilities) config.getChosenCapabilities();
X11GraphicsDevice device = (X11GraphicsDevice) screen.getDevice();
long dpy = device.getHandle();
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXContext.java
index a1e4585f7..550bde761 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXContext.java
@@ -44,7 +44,6 @@ import javax.media.nativewindow.x11.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.NullWindow;
-import com.jogamp.nativewindow.impl.x11.*;
public class X11ExternalGLXContext extends X11GLXContext {
private boolean firstMakeCurrent = true;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
index 8a8702a3e..d930179df 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
@@ -42,23 +42,13 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.NullWindow;
public class X11ExternalGLXDrawable extends X11GLXDrawable {
- private int fbConfigID;
- private int renderType;
- private X11ExternalGLXDrawable(GLDrawableFactory factory, NativeWindow component, int renderType) {
+ private X11ExternalGLXDrawable(GLDrawableFactory factory, NativeWindow component) {
super(factory, component, true);
-
- this.renderType = renderType;
-
- // Need GLXFBConfig ID in order to properly create new contexts
- // on this drawable
- X11GLXGraphicsConfiguration cfg = (X11GLXGraphicsConfiguration) component.getGraphicsConfiguration();
- fbConfigID = cfg.getFBConfigID();
}
protected static X11ExternalGLXDrawable create(GLDrawableFactory factory, GLProfile glp) {
@@ -96,7 +86,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
NullWindow nw = new NullWindow(cfg);
nw.setSurfaceHandle(drawable);
nw.setSize(w, h);
- return new X11ExternalGLXDrawable(factory, nw, GLX.GLX_RGBA_TYPE);
+ return new X11ExternalGLXDrawable(factory, nw);
}
public GLContext createContext(GLContext shareWith) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
index baa6ce1aa..90650bde9 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
@@ -43,10 +43,7 @@ import java.nio.*;
import java.util.*;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.glx.*;
-import com.jogamp.nativewindow.impl.x11.*;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
@@ -402,9 +399,8 @@ public abstract class X11GLXContext extends GLContextImpl {
glXQueryExtensionsStringInitialized = true;
}
if (glXQueryExtensionsStringAvailable) {
- long display = drawable.getNativeWindow().getDisplayHandle();
- String ret = GLX.glXQueryExtensionsString(drawable.getNativeWindow().getDisplayHandle(),
- drawable.getNativeWindow().getScreenIndex());
+ NativeWindow nw = drawable.getNativeWindow();
+ String ret = GLX.glXQueryExtensionsString(nw.getDisplayHandle(), nw.getScreenIndex());
if (DEBUG) {
System.err.println("!!! GLX extensions: " + ret);
}
@@ -431,7 +427,6 @@ public abstract class X11GLXContext extends GLContextImpl {
GLCapabilities glCaps = (GLCapabilities) config.getChosenCapabilities();
if(!glCaps.isOnscreen()) return;
- long display = drawable.getNativeWindow().getDisplayHandle();
GLXExt glXExt = getGLXExt();
if(0==hasSwapIntervalSGI) {
try {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
index 25cfcc723..8547471fb 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
@@ -42,7 +42,6 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.x11.*;
public abstract class X11GLXDrawable extends GLDrawableImpl {
protected X11GLXDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
index d958996a8..d7905aa72 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
@@ -1,39 +1,35 @@
-/*
- * Copyright (c) 2010, Sven Gothel
- * All rights reserved.
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Sven Gothel nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL Sven Gothel BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
*/
-
+
package com.jogamp.opengl.impl.x11.glx;
import com.jogamp.opengl.impl.*;
-import com.jogamp.common.os.DynamicLookupHelper;
-import com.jogamp.common.os.NativeLibrary;
-import com.jogamp.common.os.Platform;
import java.util.*;
-import java.security.*;
-import javax.media.opengl.GLException;
public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundleInfo {
protected X11GLXDynamicLibraryBundleInfo() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 5c04a29fe..9884db288 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -41,7 +41,7 @@ import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-/** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
+/** Subclass of GraphicsConfigurationFactory used when non-AWT toolkits
are used on X11 platforms. Toolkits will likely need to delegate
to this one to change the accepted and returned types of the
GraphicsDevice and GraphicsConfiguration abstractions. */
@@ -56,7 +56,18 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
public AbstractGraphicsConfiguration chooseGraphicsConfiguration(Capabilities capabilities,
CapabilitiesChooser chooser,
AbstractGraphicsScreen absScreen) {
- return chooseGraphicsConfigurationStatic(capabilities, chooser, absScreen);
+ if (!(absScreen instanceof X11GraphicsScreen)) {
+ throw new IllegalArgumentException("Only X11GraphicsScreen are allowed here");
+ }
+
+ if (capabilities != null && !(capabilities instanceof GLCapabilities)) {
+ throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilities objects");
+ }
+
+ if (chooser != null && !(chooser instanceof GLCapabilitiesChooser)) {
+ throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilitiesChooser objects");
+ }
+ return chooseGraphicsConfigurationStatic((GLCapabilities)capabilities, (GLCapabilitiesChooser)chooser, (X11GraphicsScreen)absScreen);
}
/**
@@ -109,52 +120,32 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
return new X11GLXGraphicsConfiguration(x11Screen, (null!=capsFB)?capsFB:caps, caps, null, xvis, fbcfg, fbid);
} */
- protected static X11GLXGraphicsConfiguration chooseGraphicsConfigurationStatic(Capabilities capabilities,
- CapabilitiesChooser chooser,
- AbstractGraphicsScreen absScreen) {
- if (absScreen == null) {
+ protected static X11GLXGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ X11GraphicsScreen x11Screen) {
+ if (x11Screen == null) {
throw new IllegalArgumentException("AbstractGraphicsScreen is null");
}
- if (!(absScreen instanceof X11GraphicsScreen)) {
- throw new IllegalArgumentException("Only X11GraphicsScreen are allowed here");
- }
- X11GraphicsScreen x11Screen = (X11GraphicsScreen)absScreen;
-
-
- if (capabilities != null &&
- !(capabilities instanceof GLCapabilities)) {
- throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilities objects");
- }
-
- if (chooser != null &&
- !(chooser instanceof GLCapabilitiesChooser)) {
- throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilitiesChooser objects");
- }
if (capabilities == null) {
capabilities = new GLCapabilities(null);
}
- boolean onscreen = capabilities.isOnscreen();
- boolean usePBuffer = ((GLCapabilities)capabilities).isPBuffer();
-
GLCapabilities caps2 = (GLCapabilities) capabilities.clone();
+
+ boolean usePBuffer = caps2.isPBuffer();
+
if(!caps2.isOnscreen()) {
// OFFSCREEN !DOUBLE_BUFFER // FIXME DBLBUFOFFSCRN
caps2.setDoubleBuffered(false);
}
- X11GLXGraphicsConfiguration res;
- res = chooseGraphicsConfigurationFBConfig((GLCapabilities) caps2,
- (GLCapabilitiesChooser) chooser,
- x11Screen);
+ X11GLXGraphicsConfiguration res = chooseGraphicsConfigurationFBConfig(caps2, chooser, x11Screen);
if(null==res) {
if(usePBuffer) {
throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig for "+caps2);
}
- res = chooseGraphicsConfigurationXVisual((GLCapabilities) caps2,
- (GLCapabilitiesChooser) chooser,
- x11Screen);
+ res = chooseGraphicsConfigurationXVisual(caps2, chooser, x11Screen);
}
if(null==res) {
throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig and XVisual for "+caps2);
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java
index 5482d5566..6f24d5a60 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java
@@ -40,16 +40,12 @@
package com.jogamp.opengl.impl.x11.glx;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.*;
public class X11OffscreenGLXContext extends X11GLXContext {
- private X11OffscreenGLXDrawable drawable;
public X11OffscreenGLXContext(X11OffscreenGLXDrawable drawable,
GLContext shareWith) {
super(drawable, shareWith);
- this.drawable = drawable;
}
public int getOffscreenContextPixelDataType() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXContext.java
index bb1e2fd4c..e231aba4b 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXContext.java
@@ -36,23 +36,17 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-
package com.jogamp.opengl.impl.x11.glx;
-import java.util.*;
-
-import javax.media.nativewindow.*;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.*;
public class X11OnscreenGLXContext extends X11GLXContext {
- public X11OnscreenGLXContext(X11OnscreenGLXDrawable drawable,
- GLContext shareWith) {
- super(drawable, shareWith);
- }
-
- protected boolean createImpl() {
- return createContext(true);
- }
+
+ public X11OnscreenGLXContext(X11OnscreenGLXDrawable drawable, GLContext shareWith) {
+ super(drawable, shareWith);
+ }
+
+ protected boolean createImpl() {
+ return createContext(true);
+ }
}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
index a9aafa5af..3a8bbfecc 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
@@ -41,9 +41,6 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.*;
-import com.jogamp.nativewindow.impl.x11.*;
public class X11OnscreenGLXDrawable extends X11GLXDrawable {
/** GLXWindow can't be made current on AWT with NVidia driver, hence disabled for now */
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java
index debf28127..85bbade24 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java
@@ -40,16 +40,11 @@
package com.jogamp.opengl.impl.x11.glx;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.*;
public class X11PbufferGLXContext extends X11GLXContext {
- private X11PbufferGLXDrawable drawable;
- public X11PbufferGLXContext(X11PbufferGLXDrawable drawable,
- GLContext shareWith) {
+ public X11PbufferGLXContext(X11PbufferGLXDrawable drawable, GLContext shareWith) {
super(drawable, shareWith);
- this.drawable = drawable;
}
public void bindPbufferToTexture() {
@@ -64,7 +59,7 @@ public class X11PbufferGLXContext extends X11GLXContext {
public int getFloatingPointMode() {
- return drawable.getFloatingPointMode();
+ return ((X11PbufferGLXDrawable)drawable).getFloatingPointMode();
}
protected boolean createImpl() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index 009fa147f..c00f9909e 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -41,9 +41,6 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.glx.*;
-import com.jogamp.nativewindow.impl.x11.*;
public class X11PbufferGLXDrawable extends X11GLXDrawable {
protected X11PbufferGLXDrawable(GLDrawableFactory factory, NativeWindow target) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
index 9e52040cf..de55a3148 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
@@ -34,19 +34,14 @@ package com.jogamp.opengl.impl.x11.glx.awt;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
import javax.media.nativewindow.awt.*;
import javax.media.opengl.*;
-import javax.media.opengl.awt.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.jawt.*;
import com.jogamp.nativewindow.impl.jawt.x11.*;
import com.jogamp.nativewindow.impl.x11.*;
-import com.jogamp.opengl.impl.x11.*;
-import com.jogamp.opengl.impl.x11.glx.*;
public class X11AWTGLXGraphicsConfigurationFactory extends GraphicsConfigurationFactory {
protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration");
@@ -111,11 +106,8 @@ public class X11AWTGLXGraphicsConfigurationFactory extends GraphicsConfiguration
if(DEBUG) {
System.err.println("AWT Colormodel compatible: "+capabilities);
}
-
- x11Config = (X11GraphicsConfiguration)
- GraphicsConfigurationFactory.getFactory(x11Device).chooseGraphicsConfiguration(capabilities,
- chooser,
- x11Screen);
+ GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(x11Device);
+ x11Config = (X11GraphicsConfiguration)factory.chooseGraphicsConfiguration(capabilities, chooser, x11Screen);
if (x11Config == null) {
throw new GLException("Unable to choose a GraphicsConfiguration: "+capabilities+",\n\t"+chooser+"\n\t"+x11Screen);
}