summaryrefslogtreecommitdiffstats
path: root/src/demos/es2/perftst/Perftst.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-03-19 00:33:27 +0000
committerKenneth Russel <[email protected]>2009-03-19 00:33:27 +0000
commit4433fd7343f1161a4def7152cff68d3fb8fcbb5d (patch)
treeca6b5beac19214147b2fc9e81b5cb98b4f9b7cbf /src/demos/es2/perftst/Perftst.java
parentaefbc0323da190835bc146709bf560b3e3181b39 (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/es2/perftst/Perftst.java')
-rwxr-xr-xsrc/demos/es2/perftst/Perftst.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/demos/es2/perftst/Perftst.java b/src/demos/es2/perftst/Perftst.java
index 35edf82..40dbbca 100755
--- a/src/demos/es2/perftst/Perftst.java
+++ b/src/demos/es2/perftst/Perftst.java
@@ -1,14 +1,11 @@
package demos.es2.perftst;
import java.nio.*;
-import javax.media.nwi.*;
import javax.media.opengl.*;
import javax.media.opengl.util.*;
import com.sun.opengl.util.glsl.*;
-import com.sun.nwi.impl.NWReflection;
-
import com.sun.javafx.newt.*;
import com.sun.javafx.newt.opengl.*;
@@ -45,7 +42,7 @@ public class Perftst implements MouseListener, GLEventListener {
System.err.println("Perftst.run()");
GLProfile.setProfileGL2ES2();
try {
- NWCapabilities caps = new NWCapabilities();
+ GLCapabilities caps = new GLCapabilities();
// For emulation library, use 16 bpp
caps.setRedBits(5);
caps.setGreenBits(6);
@@ -174,8 +171,13 @@ public class Perftst implements MouseListener, GLEventListener {
}
}
- PerfModule pmod = (PerfModule) NWReflection.createInstance(tstName);
- new Perftst().run(type, pmod);
- System.exit(0);
+ try {
+ PerfModule pmod = (PerfModule) Class.forName(tstName).newInstance();
+ new Perftst().run(type, pmod);
+ System.exit(0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
}
}