diff options
author | Kenneth Russel <[email protected]> | 2009-03-19 00:33:27 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-03-19 00:33:27 +0000 |
commit | 4433fd7343f1161a4def7152cff68d3fb8fcbb5d (patch) | |
tree | ca6b5beac19214147b2fc9e81b5cb98b4f9b7cbf /src/demos/context | |
parent | aefbc0323da190835bc146709bf560b3e3181b39 (diff) |
Updated demos after refactoring of OpenGL capability bits back into GLCapabilities
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@323 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/context')
-rwxr-xr-x | src/demos/context/DualContext.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java index c30c851..30e36b4 100755 --- a/src/demos/context/DualContext.java +++ b/src/demos/context/DualContext.java @@ -46,8 +46,8 @@ import java.awt.Graphics; import java.awt.GraphicsConfiguration; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import javax.media.nwi.*; -import javax.media.nwi.awt.*; +import javax.media.nativewindow.*; +import javax.media.nativewindow.awt.*; import javax.media.opengl.*; import javax.media.opengl.awt.*; import javax.media.opengl.glu.GLU; @@ -71,9 +71,9 @@ public class DualContext extends Canvas { private GLUT glut; private int repaintNum; - public DualContext(NWCapabilities capabilities) { + public DualContext(GLCapabilities capabilities) { super(unwrap((AWTGraphicsConfiguration) - NativeWindowFactory.getFactory(Canvas.class).chooseGraphicsConfiguration(capabilities, null, null))); + GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capabilities, null, null))); NativeWindow win = NativeWindowFactory.getFactory(getClass()).getNativeWindow(this); drawable = GLDrawableFactory.getFactory().createGLDrawable(win, capabilities, null); context1 = drawable.createContext(null); @@ -141,7 +141,9 @@ public class DualContext extends Canvas { public static void main(String[] args) { JFrame frame = new JFrame("Dual OpenGL Context Test"); - final DualContext dc = new DualContext(new NWCapabilities()); + // Get the GraphicsConfigurationFactory ready for OpenGL work + GLDrawableFactory.getFactory(); + final DualContext dc = new DualContext(new GLCapabilities()); frame.getContentPane().add(dc, BorderLayout.CENTER); JButton button = new JButton("Repaint"); button.addActionListener(new ActionListener() { |