summaryrefslogtreecommitdiffstats
path: root/src/demos/context/DualContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/context/DualContext.java')
-rwxr-xr-xsrc/demos/context/DualContext.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java
index 85c3078..dfb07f6 100755
--- a/src/demos/context/DualContext.java
+++ b/src/demos/context/DualContext.java
@@ -74,7 +74,8 @@ public class DualContext extends Canvas {
public DualContext(AWTGraphicsConfiguration config) {
super(unwrap(config));
NativeWindow win = NativeWindowFactory.getFactory(getClass()).getNativeWindow(this, config);
- drawable = GLDrawableFactory.getFactory(win).createGLDrawable(win);
+ GLCapabilities glCaps = (GLCapabilities) win.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ drawable = GLDrawableFactory.getFactory(glCaps.getGLProfile()).createGLDrawable(win);
context1 = drawable.createContext(null);
context2 = drawable.createContext(null);
glu = new GLU();