diff options
Diffstat (limited to 'src/demos/misc')
-rwxr-xr-x | src/demos/misc/GLCapsTableDemo.java | 15 | ||||
-rwxr-xr-x | src/demos/misc/Picking.java | 12 |
2 files changed, 3 insertions, 24 deletions
diff --git a/src/demos/misc/GLCapsTableDemo.java b/src/demos/misc/GLCapsTableDemo.java index afa85fa..7af11d7 100755 --- a/src/demos/misc/GLCapsTableDemo.java +++ b/src/demos/misc/GLCapsTableDemo.java @@ -14,9 +14,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import java.util.ArrayList; -import javax.media.nativewindow.Capabilities; import javax.media.opengl.DefaultGLCapabilitiesChooser; -import javax.media.opengl.GLProfile; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesChooser; import javax.media.opengl.awt.GLCanvas; @@ -60,12 +58,12 @@ public class GLCapsTableDemo "ABits", "aR", "aG", "aB", "aA", // accum bits "Z", "S", "AA|AAS", "PBuf(Float|RTT|RTTRec)"}; // depth, stencil, n // samples, pbuffer - private ArrayList/*<GLCapabilities>*/ available = new ArrayList/*<GLCapabilities>*/(); - private ArrayList/*<Integer>*/ indices = new ArrayList/*<Integer>*/(); + private ArrayList<GLCapabilities> available = new ArrayList<GLCapabilities>(); + private ArrayList<Integer> indices = new ArrayList<Integer>(); private Object[][] data; private JTable capsTable; private int desiredCapIndex; // pfd index - private int selected = desiredCapIndex; + // private int selected = desiredCapIndex; protected JPanel pane, pane2; private boolean updateLR;// leftright private DefaultGLCapabilitiesChooser choiceExaminer = // @@ -171,13 +169,6 @@ public class GLCapsTableDemo */ public static void main(String[] args) { - // set argument 'NotFirstUIActionOnProcess' in the JNLP's application-desc tag for example - // <application-desc main-class="demos.j2d.TextCube"/> - // <argument>NotFirstUIActionOnProcess</argument> - // </application-desc> - boolean firstUIActionOnProcess = 0==args.length || !args[0].equals("NotFirstUIActionOnProcess") ; - GLProfile.initSingleton(firstUIActionOnProcess); - GLCapsTableDemo demo = new GLCapsTableDemo(); demo.run(args); } diff --git a/src/demos/misc/Picking.java b/src/demos/misc/Picking.java index 52afca0..641b86f 100755 --- a/src/demos/misc/Picking.java +++ b/src/demos/misc/Picking.java @@ -13,7 +13,6 @@ package demos.misc; import com.jogamp.common.nio.Buffers; import java.awt.*; import java.awt.event.*; -import java.awt.Canvas.*; import java.nio.*; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; @@ -24,13 +23,6 @@ public class Picking { public static void main(String[] args) { - // set argument 'NotFirstUIActionOnProcess' in the JNLP's application-desc tag for example - // <application-desc main-class="demos.j2d.TextCube"/> - // <argument>NotFirstUIActionOnProcess</argument> - // </application-desc> - boolean firstUIActionOnProcess = 0==args.length || !args[0].equals("NotFirstUIActionOnProcess") ; - GLProfile.initSingleton(firstUIActionOnProcess); - new Picking(); } @@ -38,7 +30,6 @@ public class Picking { Frame frame = new Frame("Picking Example"); GLCapabilities capabilities = new GLCapabilities(null); - GLDrawableFactory factory = GLDrawableFactory.getFactory(capabilities.getGLProfile()); GLCanvas drawable = new GLCanvas(capabilities); final Renderer renderer = new Renderer(); drawable.addGLEventListener(renderer); @@ -66,12 +57,10 @@ public class Picking int mouse_x, mouse_y; private GLU glu = new GLU(); - private GLAutoDrawable gldrawable; public void init(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); - this.gldrawable = drawable; gl.glEnable(GL2.GL_CULL_FACE); gl.glEnable(GL2.GL_DEPTH_TEST); gl.glEnable(GL2.GL_NORMALIZE); @@ -81,7 +70,6 @@ public class Picking public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL2 gl = drawable.getGL().getGL2(); - float h = (float) height / (float) width; gl.glViewport(0, 0, width, height); gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); |