From 9c637746e8061781d6002bb279193619857cda85 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Jul 2012 04:29:47 +0200 Subject: Adapt to JOGL changes commit 00bef95008b02cc71e166da122884402e9381f44 --- src/demos/context/DualContext.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java index 05f01c8..5df79fd 100755 --- a/src/demos/context/DualContext.java +++ b/src/demos/context/DualContext.java @@ -49,6 +49,7 @@ import java.awt.event.ActionListener; import javax.media.nativewindow.GraphicsConfigurationFactory; import javax.media.nativewindow.NativeWindow; import javax.media.nativewindow.NativeWindowFactory; +import javax.media.nativewindow.VisualIDHolder; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.GL2ES1; @@ -85,7 +86,8 @@ public class DualContext extends Canvas { public DualContext(AWTGraphicsConfiguration config) { super(unwrap(config)); - NativeWindow win = NativeWindowFactory.getFactory(getClass()).getNativeWindow(this, config); + NativeWindowFactory.getFactory(getClass()); + NativeWindow win = NativeWindowFactory.getNativeWindow(this, config); GLCapabilities glCaps = (GLCapabilities) win.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); drawable = GLDrawableFactory.getFactory(glCaps.getGLProfile()).createGLDrawable(win); context1 = drawable.createContext(null); @@ -159,7 +161,7 @@ public class DualContext extends Canvas { AWTGraphicsScreen screen = (AWTGraphicsScreen)AWTGraphicsScreen.createDefault(); GLCapabilities caps = new GLCapabilities(glp); AWTGraphicsConfiguration config = (AWTGraphicsConfiguration) - GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(caps, caps, null, screen); + GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class, caps.getClass()).chooseGraphicsConfiguration(caps, caps, null, screen, VisualIDHolder.VID_UNDEFINED); final DualContext dc = new DualContext(config); frame.getContentPane().add(dc, BorderLayout.CENTER); -- cgit v1.2.3