summaryrefslogtreecommitdiffstats
path: root/src/demos/context
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-11-21 01:09:31 +0000
committerKenneth Russel <[email protected]>2008-11-21 01:09:31 +0000
commit985276e9c7eea8b85936435eff35e10ed113840b (patch)
treea4fdc33ee42a49cc834ace4171c7a21e0ffa2882 /src/demos/context
parentf25bdef3b6bc423a08390ab17e86897c85b71282 (diff)
Changed gleem to explicitly declare AWT dependencies. Updated all
demos. All demos now build cleanly. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@291 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/context')
-rwxr-xr-xsrc/demos/context/DualContext.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java
index 397b10b..34b635b 100755
--- a/src/demos/context/DualContext.java
+++ b/src/demos/context/DualContext.java
@@ -46,12 +46,8 @@ import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import javax.media.opengl.GL;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLContext;
-import javax.media.opengl.GLDrawable;
-import javax.media.opengl.GLDrawableFactory;
-import javax.media.opengl.awt.AWTGraphicsConfiguration;
+import javax.media.opengl.*;
+import javax.media.opengl.awt.*;
import javax.media.opengl.glu.GLU;
import javax.swing.JButton;
import javax.swing.JFrame;
@@ -76,7 +72,8 @@ public class DualContext extends Canvas {
public DualContext(GLCapabilities capabilities) {
super(unwrap((AWTGraphicsConfiguration)
GLDrawableFactory.getFactory().chooseGraphicsConfiguration(capabilities, null, null)));
- drawable = GLDrawableFactory.getFactory().createGLDrawable(this, capabilities, null);
+ NativeWindow win = NativeWindowFactory.getNativeWindow(this);
+ drawable = GLDrawableFactory.getFactory().createGLDrawable(win, capabilities, null);
context1 = drawable.createContext(null);
context2 = drawable.createContext(null);
glu = new GLU();