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/multisample | |
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/multisample')
-rwxr-xr-x | src/demos/multisample/Multisample.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/demos/multisample/Multisample.java b/src/demos/multisample/Multisample.java index 91f57c3..ee80d5e 100755 --- a/src/demos/multisample/Multisample.java +++ b/src/demos/multisample/Multisample.java @@ -41,7 +41,6 @@ package demos.multisample; import java.awt.*; import java.awt.event.*; -import javax.media.nwi.*; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; @@ -49,13 +48,13 @@ public class Multisample { private GLCanvas canvas; // Simple class to warn if results are not going to be as expected - static class MultisampleChooser extends DefaultNWCapabilitiesChooser { - public int chooseCapabilities(NWCapabilities desired, - NWCapabilities[] available, + static class MultisampleChooser extends DefaultGLCapabilitiesChooser { + public int chooseCapabilities(GLCapabilities desired, + GLCapabilities[] available, int windowSystemRecommendedChoice) { boolean anyHaveSampleBuffers = false; for (int i = 0; i < available.length; i++) { - NWCapabilities caps = available[i]; + GLCapabilities caps = available[i]; if (caps != null && caps.getSampleBuffers()) { anyHaveSampleBuffers = true; break; @@ -66,7 +65,7 @@ public class Multisample { System.err.println("WARNING: antialiasing will be disabled because none of the available pixel formats had it to offer"); } else { if (!available[selection].getSampleBuffers()) { - System.err.println("WARNING: antialiasing will be disabled because the DefaultNWCapabilitiesChooser didn't supply it"); + System.err.println("WARNING: antialiasing will be disabled because the DefaultGLCapabilitiesChooser didn't supply it"); } } return selection; @@ -78,8 +77,8 @@ public class Multisample { } public void run(String[] args) { - NWCapabilities caps = new NWCapabilities(); - NWCapabilitiesChooser chooser = new MultisampleChooser(); + GLCapabilities caps = new GLCapabilities(); + GLCapabilitiesChooser chooser = new MultisampleChooser(); caps.setSampleBuffers(true); caps.setNumSamples(4); |