summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-25 03:09:47 +0100
committerSven Gothel <[email protected]>2011-11-25 03:09:47 +0100
commitc59ac4647b6084181ce17cc594e9343ebe8f6d56 (patch)
tree21fcec1507770a5dcc286a92e84a9d841d42c06a /src/newt/classes/jogamp
parent0314be79a7a93931a74fe4322bc78e699d7741e9 (diff)
Complete commit bafd9b99816f55c105230a59211caf13f0315910 (NEWT):
- WindowImpl exposes private non-delegated GraphicsConfiguration, - which is being used by GLWindow's wrapped NativeWindow instantiation (eg: AWT driver) - Fix NewtFactoryAWT.getNativeWindow() use AWTGraphicsConfiguration.create(..)
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java7
-rw-r--r--src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java16
2 files changed, 15 insertions, 8 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 5e211011c..83688ef3e 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -1497,6 +1497,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// WindowImpl
//
+ /**
+ * Returns the non delegated {@link AbstractGraphicsConfiguration},
+ * see {@link #getGraphicsConfiguration()}. */
+ public final AbstractGraphicsConfiguration getPrivateGraphicsConfiguration() {
+ return config;
+ }
+
protected final long getParentWindowHandle() {
return isFullscreen() ? 0 : parentWindowHandle;
}
diff --git a/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java b/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java
index a551ae689..ea4960053 100644
--- a/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java
+++ b/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java
@@ -26,19 +26,19 @@
* or implied, of JogAmp Community.
*/
-
package jogamp.newt.awt;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.awt.*;
-
-import com.jogamp.newt.NewtFactory;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.nativewindow.NativeWindow;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.nativewindow.awt.AWTGraphicsConfiguration;
import jogamp.nativewindow.jawt.JAWTWindow;
-import jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory;
import jogamp.newt.Debug;
+import com.jogamp.newt.NewtFactory;
+
public class NewtFactoryAWT extends NewtFactory {
public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
@@ -65,7 +65,7 @@ public class NewtFactoryAWT extends NewtFactory {
}
public static JAWTWindow getNativeWindow(java.awt.Component awtComp, CapabilitiesImmutable capsRequested) {
- AWTGraphicsConfiguration config = X11AWTGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(awtComp, null, capsRequested);
+ AWTGraphicsConfiguration config = AWTGraphicsConfiguration.create(awtComp, null, capsRequested);
NativeWindow nw = NativeWindowFactory.getNativeWindow(awtComp, config); // a JAWTWindow
if(! ( nw instanceof JAWTWindow ) ) {
throw new NativeWindowException("Not an AWT NativeWindow: "+nw);