summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-21 20:58:04 +0200
committerSven Gothel <[email protected]>2012-06-21 20:58:04 +0200
commitbe0ebf39ac48e904803ad35ad280dc6ecde03119 (patch)
tree877e5b6cb721d182cf6f5b6c7bb2d6d34dcef0fd
parent9c2d74736fdd723267aaf6f7a5018dd1bc882775 (diff)
Remove GLProfile.initSingleton(..) calls and JNLP argument 'NotFirstUIActionOnProcess'; Adapt to CapabilitiesChooser API/generics change; Misc
- Remove GLProfile.initSingleton(..) calls and JNLP argument 'NotFirstUIActionOnProcess' - Adapt to CapabilitiesChooser API/generics change - Cleanup some generics use .. etc
-rw-r--r--jnlp-files/CustomText.jnlp1
-rw-r--r--jnlp-files/FlyingText.jnlp1
-rwxr-xr-xjnlp-files/Gears.jnlp1
-rw-r--r--jnlp-files/HWShadowmapsSimple.jnlp1
-rw-r--r--jnlp-files/InfiniteShadowVolumes.jnlp1
-rw-r--r--jnlp-files/JRefract.jnlp1
-rw-r--r--jnlp-files/JRefractNoOGL.jnlp1
-rw-r--r--jnlp-files/ParticleEngine.jnlp1
-rw-r--r--jnlp-files/ProceduralTexturePhysics.jnlp1
-rw-r--r--jnlp-files/TestTextRenderer.jnlp1
-rw-r--r--jnlp-files/TextCube.jnlp1
-rw-r--r--jnlp-files/TextCubeDebug.jnlp1
-rw-r--r--jnlp-files/TextFlow.jnlp1
-rw-r--r--jnlp-files/VertexArrayRange.jnlp1
-rw-r--r--jnlp-files/VertexBufferObject.jnlp1
-rw-r--r--jnlp-files/VertexProgRefract.jnlp1
-rw-r--r--jnlp-files/VertexProgWarp.jnlp1
-rw-r--r--jnlp-files/WorldWindBasicDemo.jnlp1
-rw-r--r--jnlp-files/XTrans.jnlp1
-rw-r--r--jnlp-files/version.jnlp1
-rw-r--r--jnlp-files/worldwind.jnlp1
-rwxr-xr-xsrc/demos/applets/GearsApplet.java2
-rwxr-xr-xsrc/demos/applets/GearsJOALApplet.java1
-rw-r--r--src/demos/cg/runtime_ogl/cgGL_vertex_example.java7
-rw-r--r--src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java7
-rwxr-xr-xsrc/demos/cubefbo/Main.java8
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen.java8
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen2.java8
-rwxr-xr-xsrc/demos/gamma/TestGamma.java2
-rwxr-xr-xsrc/demos/hdr/HDR.java17
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java23
-rw-r--r--src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java12
-rwxr-xr-xsrc/demos/j2d/CustomText.java21
-rwxr-xr-xsrc/demos/j2d/FlyingText.java24
-rwxr-xr-xsrc/demos/j2d/TestOverlay.java8
-rwxr-xr-xsrc/demos/j2d/TestTextRenderer.java12
-rwxr-xr-xsrc/demos/j2d/TestTextureRenderer.java11
-rwxr-xr-xsrc/demos/j2d/TextCube.java11
-rwxr-xr-xsrc/demos/j2d/TextFlow.java12
-rwxr-xr-xsrc/demos/jrefract/JRefract.java9
-rwxr-xr-xsrc/demos/misc/GLCapsTableDemo.java15
-rwxr-xr-xsrc/demos/misc/Picking.java12
-rwxr-xr-xsrc/demos/multisample/Multisample.java11
-rwxr-xr-xsrc/demos/nurbs/curveapp/CurveApp.java11
-rwxr-xr-xsrc/demos/nurbs/surfaceapp/SurfaceApp.java8
-rwxr-xr-xsrc/demos/particles/engine/ControlWindow.java14
-rwxr-xr-xsrc/demos/printext/PrintExt.java8
-rw-r--r--src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java8
-rw-r--r--src/demos/swt/Snippet209.java7
-rw-r--r--src/demos/tess/Tess.java9
-rwxr-xr-xsrc/demos/testContextDestruction/TestContextDestruction.java12
-rw-r--r--src/demos/testContextSharing/TestContextSharing.java13
-rwxr-xr-xsrc/demos/texture/TestSubImage.java8
-rwxr-xr-xsrc/demos/texture/TestTexture.java8
-rw-r--r--src/demos/vertexArrayRange/VertexArrayRange.java8
-rw-r--r--src/demos/vertexBufferObject/VertexBufferObject.java27
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java9
-rw-r--r--src/demos/vertexProgWarp/VertexProgWarp.java13
-rwxr-xr-xsrc/demos/xtrans/Main.java9
-rw-r--r--src/gleem/TestExaminerViewer.java2
-rw-r--r--src/gleem/TestHandleBox.java2
-rw-r--r--src/gleem/TestMultiWin.java2
-rw-r--r--src/gleem/TestTranslate1.java2
-rw-r--r--src/gleem/TestTranslate2.java2
-rw-r--r--src/redbook/src/glredbook10/alpha.java8
-rw-r--r--src/redbook/src/glredbook1314/combiner.java8
-rw-r--r--src/redbook/src/glredbook1314/fogcoord.java11
-rw-r--r--src/redbook/src/glredbook1314/multisamp.java8
-rw-r--r--src/redbook/src/glredbook1314/shadowmap.java8
69 files changed, 50 insertions, 437 deletions
diff --git a/jnlp-files/CustomText.jnlp b/jnlp-files/CustomText.jnlp
index c999201..1a10367 100644
--- a/jnlp-files/CustomText.jnlp
+++ b/jnlp-files/CustomText.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.j2d.CustomText">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/FlyingText.jnlp b/jnlp-files/FlyingText.jnlp
index d1d0c10..bdbdf54 100644
--- a/jnlp-files/FlyingText.jnlp
+++ b/jnlp-files/FlyingText.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.j2d.FlyingText">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/Gears.jnlp b/jnlp-files/Gears.jnlp
index a98f508..3b0da3a 100755
--- a/jnlp-files/Gears.jnlp
+++ b/jnlp-files/Gears.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.gears.Gears">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/HWShadowmapsSimple.jnlp b/jnlp-files/HWShadowmapsSimple.jnlp
index d5a9f44..51af1b8 100644
--- a/jnlp-files/HWShadowmapsSimple.jnlp
+++ b/jnlp-files/HWShadowmapsSimple.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.hwShadowmapsSimple.HWShadowmapsSimple">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/InfiniteShadowVolumes.jnlp b/jnlp-files/InfiniteShadowVolumes.jnlp
index 6214c0e..ff1d3a2 100644
--- a/jnlp-files/InfiniteShadowVolumes.jnlp
+++ b/jnlp-files/InfiniteShadowVolumes.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.infiniteShadowVolumes.InfiniteShadowVolumes">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/JRefract.jnlp b/jnlp-files/JRefract.jnlp
index 9895c1c..8f63eee 100644
--- a/jnlp-files/JRefract.jnlp
+++ b/jnlp-files/JRefract.jnlp
@@ -25,6 +25,5 @@
</resources>
<application-desc main-class="demos.jrefract.JRefract">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/JRefractNoOGL.jnlp b/jnlp-files/JRefractNoOGL.jnlp
index 8ba44ec..dbc8905 100644
--- a/jnlp-files/JRefractNoOGL.jnlp
+++ b/jnlp-files/JRefractNoOGL.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.jrefract.JRefract">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/ParticleEngine.jnlp b/jnlp-files/ParticleEngine.jnlp
index f21ab40..e6ae8ce 100644
--- a/jnlp-files/ParticleEngine.jnlp
+++ b/jnlp-files/ParticleEngine.jnlp
@@ -19,6 +19,5 @@
</resources>
<application-desc main-class="demos.particles.engine.ControlWindow">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/ProceduralTexturePhysics.jnlp b/jnlp-files/ProceduralTexturePhysics.jnlp
index 9e7409e..c5c8bd0 100644
--- a/jnlp-files/ProceduralTexturePhysics.jnlp
+++ b/jnlp-files/ProceduralTexturePhysics.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.proceduralTexturePhysics.ProceduralTexturePhysics">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/TestTextRenderer.jnlp b/jnlp-files/TestTextRenderer.jnlp
index c5495a8..d08622d 100644
--- a/jnlp-files/TestTextRenderer.jnlp
+++ b/jnlp-files/TestTextRenderer.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.j2d.TestTextRenderer">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/TextCube.jnlp b/jnlp-files/TextCube.jnlp
index 3e60843..ef55d33 100644
--- a/jnlp-files/TextCube.jnlp
+++ b/jnlp-files/TextCube.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.j2d.TextCube">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/TextCubeDebug.jnlp b/jnlp-files/TextCubeDebug.jnlp
index a5a1fe6..e54aeb1 100644
--- a/jnlp-files/TextCubeDebug.jnlp
+++ b/jnlp-files/TextCubeDebug.jnlp
@@ -25,6 +25,5 @@
</resources>
<application-desc main-class="demos.j2d.TextCube">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/TextFlow.jnlp b/jnlp-files/TextFlow.jnlp
index c7693bf..63bcc86 100644
--- a/jnlp-files/TextFlow.jnlp
+++ b/jnlp-files/TextFlow.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.j2d.TextFlow">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/VertexArrayRange.jnlp b/jnlp-files/VertexArrayRange.jnlp
index 8c3e8ff..aa90f65 100644
--- a/jnlp-files/VertexArrayRange.jnlp
+++ b/jnlp-files/VertexArrayRange.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.vertexArrayRange.VertexArrayRange">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/VertexBufferObject.jnlp b/jnlp-files/VertexBufferObject.jnlp
index 255733d..febb732 100644
--- a/jnlp-files/VertexBufferObject.jnlp
+++ b/jnlp-files/VertexBufferObject.jnlp
@@ -20,6 +20,5 @@
</resources>
<application-desc main-class="demos.vertexBufferObject.VertexBufferObject">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/VertexProgRefract.jnlp b/jnlp-files/VertexProgRefract.jnlp
index 9cbeafa..887d00c 100644
--- a/jnlp-files/VertexProgRefract.jnlp
+++ b/jnlp-files/VertexProgRefract.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.vertexProgRefract.VertexProgRefract">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/VertexProgWarp.jnlp b/jnlp-files/VertexProgWarp.jnlp
index be9c720..7374ae4 100644
--- a/jnlp-files/VertexProgWarp.jnlp
+++ b/jnlp-files/VertexProgWarp.jnlp
@@ -21,6 +21,5 @@
</resources>
<application-desc main-class="demos.vertexProgWarp.VertexProgWarp">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/WorldWindBasicDemo.jnlp b/jnlp-files/WorldWindBasicDemo.jnlp
index a210021..14fea2d 100644
--- a/jnlp-files/WorldWindBasicDemo.jnlp
+++ b/jnlp-files/WorldWindBasicDemo.jnlp
@@ -24,6 +24,5 @@
<extension name="worldwind" href="http://worldwind.arc.nasa.gov/java/0.3.0/webstart/worldwind.jnlp"/>
</resources>
<application-desc main-class="gov.nasa.worldwind.examples.ApplicationTemplate">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/XTrans.jnlp b/jnlp-files/XTrans.jnlp
index a914830..5d4e4da 100644
--- a/jnlp-files/XTrans.jnlp
+++ b/jnlp-files/XTrans.jnlp
@@ -24,6 +24,5 @@
</resources>
<application-desc main-class="demos.xtrans.Main">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/version.jnlp b/jnlp-files/version.jnlp
index bba6aa7..9687cc6 100644
--- a/jnlp-files/version.jnlp
+++ b/jnlp-files/version.jnlp
@@ -18,6 +18,5 @@
</resources>
<application-desc main-class="demos.misc.VersionInfo">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/jnlp-files/worldwind.jnlp b/jnlp-files/worldwind.jnlp
index 3ddf504..b3edd9f 100644
--- a/jnlp-files/worldwind.jnlp
+++ b/jnlp-files/worldwind.jnlp
@@ -23,6 +23,5 @@
<extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" version="JOGAMP_VERSION"/>
</resources>
<application-desc main-class="worldwinddemo.BasicDemo">
- <argument>NotFirstUIActionOnProcess</argument>
</application-desc>
</jnlp>
diff --git a/src/demos/applets/GearsApplet.java b/src/demos/applets/GearsApplet.java
index 046f117..6fd737d 100755
--- a/src/demos/applets/GearsApplet.java
+++ b/src/demos/applets/GearsApplet.java
@@ -3,7 +3,6 @@ package demos.applets;
import java.applet.*;
import java.awt.*;
import demos.gears.Gears;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;
import javax.media.opengl.GLAnimatorControl;
@@ -16,7 +15,6 @@ public class GearsApplet extends Applet {
public void init() {
System.err.println("GearsApplet: init() - begin");
- GLProfile.initSingleton(false);
setLayout(new BorderLayout());
GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener(new Gears());
diff --git a/src/demos/applets/GearsJOALApplet.java b/src/demos/applets/GearsJOALApplet.java
index 1c03636..582f0f3 100755
--- a/src/demos/applets/GearsJOALApplet.java
+++ b/src/demos/applets/GearsJOALApplet.java
@@ -19,7 +19,6 @@ public class GearsJOALApplet extends Applet {
private GLAnimatorControl animator;
public void init() {
- GLProfile.initSingleton(false);
setLayout(new GridLayout(1, 2));
GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener(new Gears());
diff --git a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
index f77effd..cb3c36f 100644
--- a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
+++ b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
@@ -270,13 +270,6 @@ public class cgGL_vertex_example implements GLEventListener
public static void main(String[] argv)
{
- // 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==argv.length || !argv[0].equals("NotFirstUIActionOnProcess") ;
- GLProfile.initSingleton(firstUIActionOnProcess);
-
// GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
// GLCanvas canvas = new GLCanvas(caps);
GLCanvas canvas = new GLCanvas();
diff --git a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java
index d902808..983cab8 100644
--- a/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java
+++ b/src/demos/cg/runtime_ogl_vertex_fragment/runtime_ogl_vertex_fragment.java
@@ -68,13 +68,6 @@ public class runtime_ogl_vertex_fragment implements GLEventListener
public static void main(String[] argv)
{
- // 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==argv.length || !argv[0].equals("NotFirstUIActionOnProcess") ;
- GLProfile.initSingleton(firstUIActionOnProcess);
-
Frame frame = new Frame("Cg demo (runtime_ogl_vertex_fragment)");
GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener(new runtime_ogl_vertex_fragment());
diff --git a/src/demos/cubefbo/Main.java b/src/demos/cubefbo/Main.java
index bebe89e..a3cebb2 100755
--- a/src/demos/cubefbo/Main.java
+++ b/src/demos/cubefbo/Main.java
@@ -36,7 +36,6 @@ package demos.cubefbo;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;
@@ -46,13 +45,6 @@ import javax.media.opengl.GLAnimatorControl;
public class Main {
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);
-
GLCapabilities caps = new GLCapabilities(null);
GLCanvas canvas = new GLCanvas(caps);
diff --git a/src/demos/fullscreen/GearsFullscreen.java b/src/demos/fullscreen/GearsFullscreen.java
index eaded8e..0dac67f 100755
--- a/src/demos/fullscreen/GearsFullscreen.java
+++ b/src/demos/fullscreen/GearsFullscreen.java
@@ -5,7 +5,6 @@ import java.awt.event.*;
import demos.gears.Gears;
import demos.util.*;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
@@ -31,13 +30,6 @@ public class GearsFullscreen {
private int initHeight = 300;
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 GearsFullscreen().run(args);
}
diff --git a/src/demos/fullscreen/GearsFullscreen2.java b/src/demos/fullscreen/GearsFullscreen2.java
index 1d3df0a..38911a4 100755
--- a/src/demos/fullscreen/GearsFullscreen2.java
+++ b/src/demos/fullscreen/GearsFullscreen2.java
@@ -10,7 +10,6 @@ import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
import javax.swing.JButton;
@@ -40,13 +39,6 @@ public class GearsFullscreen2 {
private int initHeight = 300;
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 GearsFullscreen2().run(args);
}
diff --git a/src/demos/gamma/TestGamma.java b/src/demos/gamma/TestGamma.java
index e8e46b5..4dff454 100755
--- a/src/demos/gamma/TestGamma.java
+++ b/src/demos/gamma/TestGamma.java
@@ -80,8 +80,6 @@ public class TestGamma implements GLEventListener {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
-
if (args.length != 3) {
usage();
}
diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java
index a0df07b..1a2c6a1 100755
--- a/src/demos/hdr/HDR.java
+++ b/src/demos/hdr/HDR.java
@@ -27,7 +27,6 @@ import java.io.InputStream;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -131,8 +130,6 @@ public class HDR extends Demo {
0.0f, 0.0f, 0.0f, 1.0f };
public static void main(String[] args) {
- GLProfile.initSingleton(false);
-
GLCanvas canvas = new GLCanvas();
final HDR demo = new HDR();
@@ -271,8 +268,8 @@ public class HDR extends Demo {
private float zNear = 0.1f;
private float zFar = 10.0f;
- private boolean wire = false;
- private boolean toggleWire = false;
+ // private boolean wire = false;
+ // private boolean toggleWire = false;
private GLU glu = new GLU();
public void init(GLAutoDrawable drawable) {
@@ -1058,7 +1055,7 @@ public class HDR extends Demo {
// NOTE: need to instantiate CgPipeline reflectively to avoid
// compile-time dependence (since Cg support might not be present)
try {
- Class cgPipelineClass = Class.forName("demos.hdr.CgPipeline");
+ Class<?> cgPipelineClass = Class.forName("demos.hdr.CgPipeline");
pipeline = (Pipeline) cgPipelineClass.newInstance();
} catch (Exception e) {
throw new GLException(e);
@@ -1139,7 +1136,7 @@ public class HDR extends Demo {
gl.glGenProgramsARB(1, tmp, 0);
prog_id = tmp[0];
gl.glBindProgramARB(target, prog_id);
- int size = code.length();
+ // int size = code.length();
gl.glProgramStringARB(target, GL2.GL_PROGRAM_FORMAT_ASCII_ARB, code.length(), code);
int[] errPos = new int[1];
gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION_ARB, errPos, 0);
@@ -1184,6 +1181,7 @@ public class HDR extends Demo {
return (float) (Math.exp(-x*x/(2*s*s)) / (s*Math.sqrt(2*Math.PI)));
}
+ /*
private void dumpWeights(int n) {
float s = n / 3.0f;
float sum = 0.0f;
@@ -1194,7 +1192,7 @@ public class HDR extends Demo {
System.err.println("" + x + ": " + w);
}
System.err.println("sum = " + sum);
- }
+ } */
// optimized version
// pairs texture lookups, uses half precision
@@ -1266,9 +1264,10 @@ public class HDR extends Demo {
shutdownDemo();
}
+ /*
private void printThreadName(String where) {
System.err.println("In " + where + ": current thread = " + Thread.currentThread().getName());
- }
+ } */
private static void runExit(final Animator animator) {
// Note: calling System.exit() synchronously inside the draw,
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
index e2af4b3..509b42e 100644
--- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
+++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
@@ -55,10 +55,6 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.util.ArrayList;
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.GLPipelineFactory;
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -83,13 +79,6 @@ import javax.swing.JOptionPane;
public class HWShadowmapsSimple extends Demo {
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);
-
final GLCanvas canvas = new GLCanvas();
final HWShadowmapsSimple demo = new HWShadowmapsSimple();
canvas.addGLEventListener(demo);
@@ -155,12 +144,12 @@ public class HWShadowmapsSimple extends Demo {
this.incr = incr;
}
};
- private java.util.List/*<Tweak>*/ tweaks = new ArrayList();
+ private java.util.List<Tweak> tweaks = new ArrayList<Tweak>();
private static final int R_COORDINATE_SCALE = 0;
private static final int R_COORDINATE_BIAS = 1;
private static final int POLYGON_OFFSET_SCALE = 2;
private static final int POLYGON_OFFSET_BIAS = 3;
- private int curr_tweak;
+ // private int curr_tweak;
// Texture objects
private static final int TEX_SIZE = 1024;
@@ -470,8 +459,8 @@ public class HWShadowmapsSimple extends Demo {
gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
- gl.glPolygonOffset(((Tweak) tweaks.get(POLYGON_OFFSET_SCALE)).val,
- ((Tweak) tweaks.get(POLYGON_OFFSET_BIAS)).val);
+ gl.glPolygonOffset(tweaks.get(POLYGON_OFFSET_SCALE).val,
+ tweaks.get(POLYGON_OFFSET_BIAS).val);
gl.glEnable(GL2.GL_POLYGON_OFFSET_FILL);
render_scene_from_light_view(gl, drawable, 0, 0);
@@ -709,8 +698,8 @@ public class HWShadowmapsSimple extends Demo {
gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glLoadIdentity();
- gl.glTranslatef(.5f, .5f, ((Tweak) tweaks.get(R_COORDINATE_SCALE)).val);
- gl.glScalef(.5f, .5f, ((Tweak) tweaks.get(R_COORDINATE_BIAS)).val);
+ gl.glTranslatef(.5f, .5f, tweaks.get(R_COORDINATE_SCALE).val);
+ gl.glScalef(.5f, .5f, tweaks.get(R_COORDINATE_BIAS).val);
glu.gluPerspective(lightshaper_fovy, 1, lightshaper_zNear, lightshaper_zFar);
applyTransform(gl, spotlightInverseTransform);
gl.glMatrixMode(GL2.GL_MODELVIEW);
diff --git a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
index eec06ff..ce51b88 100644
--- a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
+++ b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
@@ -49,15 +49,10 @@ import gleem.linalg.Vec3f;
import gleem.linalg.Vec4f;
import java.awt.BorderLayout;
import java.awt.Frame;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.nio.FloatBuffer;
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -86,13 +81,6 @@ import javax.media.opengl.glu.GLU;
public class InfiniteShadowVolumes extends Demo {
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);
-
GLCapabilities caps = new GLCapabilities(null);
caps.setStencilBits(16);
final GLCanvas canvas = new GLCanvas(caps);
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java
index 3a68761..8405b6e 100755
--- a/src/demos/j2d/CustomText.java
+++ b/src/demos/j2d/CustomText.java
@@ -42,7 +42,6 @@ package demos.j2d;
import com.jogamp.opengl.util.awt.TextRenderer;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureCoords;
-import com.jogamp.opengl.util.texture.TextureIO;
import com.jogamp.opengl.util.texture.awt.AWTTextureIO;
import demos.common.Demo;
import demos.util.FPSCounter;
@@ -69,7 +68,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -87,13 +85,6 @@ import javax.swing.JPanel;
public class CustomText extends Demo {
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);
-
JFrame frame = new JFrame("Custom Text");
frame.getContentPane().setLayout(new BorderLayout());
@@ -131,7 +122,7 @@ public class CustomText extends Demo {
// Put a little physics on the text to make it look nicer
private static final float INIT_ANG_VEL_MAG = 0.3f;
private static final float INIT_VEL_MAG = 400.0f;
- private static final int DEFAULT_DROP_SHADOW_DIST = 20;
+ // private static final int DEFAULT_DROP_SHADOW_DIST = 20;
// Information about each piece of text
private static class TextInfo {
@@ -144,7 +135,7 @@ public class CustomText extends Demo {
String text;
}
- private List/*<TextInfo>*/ textInfo = new ArrayList/*<TextInfo>*/();
+ private List<TextInfo> textInfo = new ArrayList<TextInfo>();
private Time time;
private Texture backgroundTexture;
private TextRenderer renderer;
@@ -255,8 +246,8 @@ public class CustomText extends Demo {
// Update velocities and positions of all text
float deltaT = (float) time.deltaT();
Vec2f tmp = new Vec2f();
- for (Iterator iter = textInfo.iterator(); iter.hasNext(); ) {
- TextInfo info = (TextInfo) iter.next();
+ for (Iterator<TextInfo> iter = textInfo.iterator(); iter.hasNext(); ) {
+ TextInfo info = iter.next();
// Randomize things a little bit at run time
if (random.nextInt(1000) == 0) {
@@ -328,8 +319,8 @@ public class CustomText extends Demo {
gl.glMatrixMode(GL2ES1.GL_MODELVIEW);
- for (Iterator iter = textInfo.iterator(); iter.hasNext(); ) {
- TextInfo info = (TextInfo) iter.next();
+ for (Iterator<TextInfo> iter = textInfo.iterator(); iter.hasNext(); ) {
+ TextInfo info = iter.next();
gl.glLoadIdentity();
gl.glTranslatef(info.position.x(),
info.position.y(),
diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java
index debb9c7..949a231 100755
--- a/src/demos/j2d/FlyingText.java
+++ b/src/demos/j2d/FlyingText.java
@@ -42,7 +42,6 @@ package demos.j2d;
import com.jogamp.opengl.util.awt.TextRenderer;
import com.jogamp.opengl.util.texture.Texture;
import com.jogamp.opengl.util.texture.TextureCoords;
-import com.jogamp.opengl.util.texture.TextureIO;
import com.jogamp.opengl.util.texture.awt.AWTTextureIO;
import demos.common.Demo;
import demos.util.FPSCounter;
@@ -65,9 +64,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.awt.GLCanvas;
@@ -88,13 +85,6 @@ import javax.swing.event.ChangeListener;
public class FlyingText extends Demo {
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);
-
JFrame frame = new JFrame("Flying Text");
frame.getContentPane().setLayout(new BorderLayout());
@@ -157,7 +147,7 @@ public class FlyingText extends Demo {
String text;
}
- private List/*<TextInfo>*/ textInfo = new ArrayList/*<TextInfo>*/();
+ private List<TextInfo> textInfo = new ArrayList<TextInfo>();
private int dropShadowDistance = DEFAULT_DROP_SHADOW_DIST;
private Time time;
private Texture backgroundTexture;
@@ -297,8 +287,8 @@ public class FlyingText extends Demo {
// Update velocities and positions of all text
float deltaT = (float) time.deltaT();
Vec2f tmp = new Vec2f();
- for (Iterator iter = textInfo.iterator(); iter.hasNext(); ) {
- TextInfo info = (TextInfo) iter.next();
+ for (Iterator<TextInfo> iter = textInfo.iterator(); iter.hasNext(); ) {
+ TextInfo info = iter.next();
// Randomize things a little bit at run time
if (random.nextInt(1000) == 0) {
@@ -384,8 +374,8 @@ public class FlyingText extends Demo {
// First render drop shadows
renderer.setColor(0, 0, 0, 0.5f);
- for (Iterator iter = textInfo.iterator(); iter.hasNext(); ) {
- TextInfo info = (TextInfo) iter.next();
+ for (Iterator<TextInfo> iter = textInfo.iterator(); iter.hasNext(); ) {
+ TextInfo info = iter.next();
gl.glLoadIdentity();
gl.glTranslatef(info.position.x() + dropShadowDistance,
info.position.y() - dropShadowDistance,
@@ -397,8 +387,8 @@ public class FlyingText extends Demo {
}
// Now render the actual text
- for (Iterator iter = textInfo.iterator(); iter.hasNext(); ) {
- TextInfo info = (TextInfo) iter.next();
+ for (Iterator<TextInfo> iter = textInfo.iterator(); iter.hasNext(); ) {
+ TextInfo info = iter.next();
gl.glLoadIdentity();
gl.glTranslatef(info.position.x(),
info.position.y(),
diff --git a/src/demos/j2d/TestOverlay.java b/src/demos/j2d/TestOverlay.java
index eda3e0a..13cb39e 100755
--- a/src/demos/j2d/TestOverlay.java
+++ b/src/demos/j2d/TestOverlay.java
@@ -54,7 +54,6 @@ import java.awt.event.WindowEvent;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.text.DecimalFormat;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -67,13 +66,6 @@ import com.jogamp.opengl.util.Animator;
public class TestOverlay implements GLEventListener {
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);
-
Frame frame = new Frame("Java 2D Overlay Test");
GLCapabilities caps = new GLCapabilities(null);
caps.setAlphaBits(8);
diff --git a/src/demos/j2d/TestTextRenderer.java b/src/demos/j2d/TestTextRenderer.java
index 53042dd..4779522 100755
--- a/src/demos/j2d/TestTextRenderer.java
+++ b/src/demos/j2d/TestTextRenderer.java
@@ -50,7 +50,6 @@ import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.geom.Rectangle2D;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -65,13 +64,6 @@ import com.jogamp.opengl.util.Animator;
public class TestTextRenderer implements GLEventListener {
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);
-
Frame frame = new Frame("Text Renderer Test");
GLCapabilities caps = new GLCapabilities(null);
caps.setAlphaBits(8);
@@ -101,7 +93,7 @@ public class TestTextRenderer implements GLEventListener {
private TextRenderer renderer;
private Time time;
- private Font font;
+ // private Font font;
private Vec2f velocity = new Vec2f(100.0f, 150.0f);
private Vec2f position;
private String TEST_STRING = "Java 2D Text";
@@ -154,8 +146,6 @@ public class TestTextRenderer implements GLEventListener {
velocity.setY(-1.0f * Math.abs(velocity.y()));
}
- GL gl = drawable.getGL();
-
// Prepare to draw text
renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
diff --git a/src/demos/j2d/TestTextureRenderer.java b/src/demos/j2d/TestTextureRenderer.java
index cedee83..a217c7b 100755
--- a/src/demos/j2d/TestTextureRenderer.java
+++ b/src/demos/j2d/TestTextureRenderer.java
@@ -61,7 +61,6 @@ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
-import javax.media.opengl.glu.GLU;
import com.jogamp.opengl.util.Animator;
@@ -71,13 +70,6 @@ import com.jogamp.opengl.util.Animator;
public class TestTextureRenderer implements GLEventListener {
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);
-
Frame frame = new Frame("Java 2D Renderer Test");
GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2));
caps.setAlphaBits(8);
@@ -114,7 +106,6 @@ public class TestTextureRenderer implements GLEventListener {
private Rectangle textBounds;
private Rectangle fpsBounds;
private String TEST_STRING = "Java 2D Text";
- private GLU glu = new GLU();
private long startTime;
private int frameCount;
private DecimalFormat format = new DecimalFormat("####.00");
@@ -195,8 +186,6 @@ public class TestTextureRenderer implements GLEventListener {
velocity.setY(-1.0f * Math.abs(velocity.y()));
}
- GL gl = drawable.getGL();
-
// Prepare to draw from the renderer's texture
renderer.beginOrthoRendering(drawable.getWidth(), drawable.getHeight());
diff --git a/src/demos/j2d/TextCube.java b/src/demos/j2d/TextCube.java
index 4587e10..6b72259 100755
--- a/src/demos/j2d/TextCube.java
+++ b/src/demos/j2d/TextCube.java
@@ -50,9 +50,7 @@ import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.geom.Rectangle2D;
-import javax.media.opengl.GL;
import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLProfile;
@@ -74,13 +72,6 @@ public class TextCube extends Demo {
private float textScaleFactor;
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);
-
Frame frame = new Frame("Text Cube");
frame.setLayout(new BorderLayout());
@@ -119,7 +110,7 @@ public class TextCube extends Demo {
// them all fit on the faces of the cube
Rectangle2D bounds = renderer.getBounds("Bottom");
float w = (float) bounds.getWidth();
- float h = (float) bounds.getHeight();
+ // float h = (float) bounds.getHeight();
textScaleFactor = 1.0f / (w * 1.1f);
fps = new FPSCounter(drawable, 36);
diff --git a/src/demos/j2d/TextFlow.java b/src/demos/j2d/TextFlow.java
index f0f29f8..395554b 100755
--- a/src/demos/j2d/TextFlow.java
+++ b/src/demos/j2d/TextFlow.java
@@ -61,7 +61,6 @@ import javax.media.opengl.GL;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.GLAutoDrawable;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
@@ -75,13 +74,6 @@ import com.jogamp.opengl.util.Animator;
public class TextFlow extends Demo {
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);
-
Frame frame = new Frame("Text Flow");
frame.setLayout(new BorderLayout());
@@ -111,7 +103,7 @@ public class TextFlow extends Demo {
animator.start();
}
- private List/*<String>*/ lines = new ArrayList();
+ private List<String> lines = new ArrayList<String>();
private Time time;
private TextRenderer renderer;
private int curParagraph;
@@ -128,7 +120,7 @@ public class TextFlow extends Demo {
FontRenderContext frc = renderer.getFontRenderContext();
for (int i = 0; i < text.length; i++) {
String paragraph = text[i];
- Map attrs = new HashMap();
+ Map<TextAttribute, Font> attrs = new HashMap<TextAttribute, Font>();
attrs.put(TextAttribute.FONT, renderer.getFont());
AttributedString str = new AttributedString(paragraph, attrs);
LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(), frc);
diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java
index 735355c..5bb5a84 100755
--- a/src/demos/jrefract/JRefract.java
+++ b/src/demos/jrefract/JRefract.java
@@ -87,19 +87,12 @@ import javax.swing.event.InternalFrameEvent;
*/
public class JRefract {
- private boolean useRegisterCombiners;
+ // private boolean useRegisterCombiners;
private AnimatorBase animator;
private JDesktopPane desktop;
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 JRefract().run(args);
}
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();
diff --git a/src/demos/multisample/Multisample.java b/src/demos/multisample/Multisample.java
index 5b5d6b2..6c2624b 100755
--- a/src/demos/multisample/Multisample.java
+++ b/src/demos/multisample/Multisample.java
@@ -42,6 +42,8 @@ package demos.multisample;
import java.util.List;
import java.awt.*;
import java.awt.event.*;
+
+import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.opengl.*;
import javax.media.opengl.awt.GLCanvas;
@@ -51,7 +53,7 @@ public class Multisample {
// Simple class to warn if results are not going to be as expected
static class MultisampleChooser extends DefaultGLCapabilitiesChooser {
public int chooseCapabilities(GLCapabilities desired,
- List/*<GLCapabilitiesImmutable>*/ available,
+ List<? extends CapabilitiesImmutable> available,
int windowSystemRecommendedChoice) {
boolean anyHaveSampleBuffers = false;
for (int i = 0; i < available.size(); i++) {
@@ -75,13 +77,6 @@ public class Multisample {
}
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 Multisample().run(args);
}
diff --git a/src/demos/nurbs/curveapp/CurveApp.java b/src/demos/nurbs/curveapp/CurveApp.java
index ffefa42..5834e88 100755
--- a/src/demos/nurbs/curveapp/CurveApp.java
+++ b/src/demos/nurbs/curveapp/CurveApp.java
@@ -9,10 +9,8 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.GLCanvas;
+import javax.media.opengl.awt.GLCanvas;
import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
@@ -490,13 +488,6 @@ public class CurveApp extends JFrame implements ActionListener
*
*/
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 CurveApp();
}
diff --git a/src/demos/nurbs/surfaceapp/SurfaceApp.java b/src/demos/nurbs/surfaceapp/SurfaceApp.java
index 53631ce..01b2012 100755
--- a/src/demos/nurbs/surfaceapp/SurfaceApp.java
+++ b/src/demos/nurbs/surfaceapp/SurfaceApp.java
@@ -31,7 +31,6 @@ import javax.swing.ToolTipManager;
import demos.nurbs.icons.*;
import demos.nurbs.knotslidercomponent.JKnotSlider;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
/**
@@ -732,13 +731,6 @@ public class SurfaceApp extends JFrame implements ActionListener
*
*/
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 SurfaceApp();
}
diff --git a/src/demos/particles/engine/ControlWindow.java b/src/demos/particles/engine/ControlWindow.java
index ab94ff1..f496ecb 100755
--- a/src/demos/particles/engine/ControlWindow.java
+++ b/src/demos/particles/engine/ControlWindow.java
@@ -38,12 +38,11 @@ package demos.particles.engine;
import javax.swing.*;
import java.awt.*;
+
import javax.swing.border.*;
import java.awt.event.*;
import javax.swing.event.*;
-import javax.media.opengl.GLProfile;
-
public class ControlWindow extends JFrame implements ActionListener, ChangeListener {
// For the engine
@@ -127,7 +126,7 @@ public class ControlWindow extends JFrame implements ActionListener, ChangeListe
constraints = new GridBagConstraints();
constraints.insets = new Insets(3,2,3,2);
- constraints.fill=constraints.HORIZONTAL;
+ constraints.fill=GridBagConstraints.HORIZONTAL;
constraints.gridx = 0;
constraints.gridy = 0;
@@ -178,7 +177,7 @@ public class ControlWindow extends JFrame implements ActionListener, ChangeListe
constraints = new GridBagConstraints();
constraints.weightx = constraints.weighty = 1.0d;
- constraints.fill=constraints.BOTH;
+ constraints.fill=GridBagConstraints.BOTH;
constraints.gridx = 0;
constraints.gridy = 0;
@@ -196,13 +195,6 @@ public class ControlWindow extends JFrame implements ActionListener, ChangeListe
}
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 ControlWindow();
}
diff --git a/src/demos/printext/PrintExt.java b/src/demos/printext/PrintExt.java
index 4510f47..d2abe17 100755
--- a/src/demos/printext/PrintExt.java
+++ b/src/demos/printext/PrintExt.java
@@ -6,7 +6,6 @@
package demos.printext;
import java.awt.Frame;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
@@ -16,13 +15,6 @@ import javax.media.opengl.awt.GLCanvas;
public class PrintExt {
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);
-
Frame frame = new Frame();
GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener(new Listener());
diff --git a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
index bbde5ab..dcc063b 100644
--- a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
+++ b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
@@ -50,7 +50,6 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -76,13 +75,6 @@ import javax.swing.JOptionPane;
*/
public class ProceduralTexturePhysics extends Demo {
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);
-
GLCanvas canvas = new GLCanvas();
final ProceduralTexturePhysics demo = new ProceduralTexturePhysics();
canvas.addGLEventListener(demo);
diff --git a/src/demos/swt/Snippet209.java b/src/demos/swt/Snippet209.java
index 30a1347..f75d59d 100644
--- a/src/demos/swt/Snippet209.java
+++ b/src/demos/swt/Snippet209.java
@@ -62,13 +62,6 @@ public class Snippet209 {
}
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);
-
final GLProfile gl2Profile = GLProfile.get(GLProfile.GL2);
final Display display = new Display();
Shell shell = new Shell(display);
diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java
index d1484c4..8de045e 100644
--- a/src/demos/tess/Tess.java
+++ b/src/demos/tess/Tess.java
@@ -45,9 +45,7 @@ package demos.tess;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.DebugGL2;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
@@ -75,13 +73,6 @@ import javax.media.opengl.glu.GLUtessellator;
public class Tess {
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);
-
try {
Frame frame = new Frame("Tess Demo");
frame.setSize(500, 500);
diff --git a/src/demos/testContextDestruction/TestContextDestruction.java b/src/demos/testContextDestruction/TestContextDestruction.java
index 7a89082..060c2cf 100755
--- a/src/demos/testContextDestruction/TestContextDestruction.java
+++ b/src/demos/testContextDestruction/TestContextDestruction.java
@@ -50,10 +50,7 @@ import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.DebugGL2;
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
@@ -74,20 +71,11 @@ public class TestContextDestruction {
private Component frame1RemovedComponent;
private Component frame2ContainedComponent;
private Component frame2RemovedComponent;
- private GLCanvas canvas;
private Canvas emptyCanvas;
- private boolean frame1IsTarget = true;
private float angle = 0.0f;
private static final int BORDER_WIDTH = 6;
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 TestContextDestruction().run(args);
}
diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java
index 1063f36..c2b8721 100644
--- a/src/demos/testContextSharing/TestContextSharing.java
+++ b/src/demos/testContextSharing/TestContextSharing.java
@@ -41,32 +41,19 @@ package demos.testContextSharing;
import java.awt.BorderLayout;
import java.awt.Frame;
-import java.util.Random;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.DebugGL2;
-import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.opengl.util.Animator;
-
/** A simple demonstration of sharing of display lists between drawables. */
public class TestContextSharing {
private int gearDisplayList;
- private Frame delayedFrame;
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 TestContextSharing().run(args);
}
diff --git a/src/demos/texture/TestSubImage.java b/src/demos/texture/TestSubImage.java
index 05cbb59..137b536 100755
--- a/src/demos/texture/TestSubImage.java
+++ b/src/demos/texture/TestSubImage.java
@@ -60,7 +60,6 @@ import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -325,13 +324,6 @@ public class TestSubImage {
}
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 TestSubImage().run();
}
}
diff --git a/src/demos/texture/TestTexture.java b/src/demos/texture/TestTexture.java
index 224c247..f53327a 100755
--- a/src/demos/texture/TestTexture.java
+++ b/src/demos/texture/TestTexture.java
@@ -50,7 +50,6 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.DebugGL2;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
@@ -74,13 +73,6 @@ import javax.swing.KeyStroke;
public class TestTexture implements GLEventListener {
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 TestTexture().run(args);
}
diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java
index aed110d..b9ee76e 100644
--- a/src/demos/vertexArrayRange/VertexArrayRange.java
+++ b/src/demos/vertexArrayRange/VertexArrayRange.java
@@ -45,7 +45,6 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -90,13 +89,6 @@ import javax.swing.JOptionPane;
public class VertexArrayRange extends Demo {
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);
-
boolean startSlow = false;
if (args.length > 1) {
diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java
index e71a785..6f057dd 100644
--- a/src/demos/vertexBufferObject/VertexBufferObject.java
+++ b/src/demos/vertexBufferObject/VertexBufferObject.java
@@ -47,13 +47,14 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
+import java.util.Arrays;
+
import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.AWTGLAutoDrawable;
import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
@@ -87,24 +88,11 @@ import javax.swing.JOptionPane;
public class VertexBufferObject extends Demo {
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);
-
boolean vboEnabled = true;
- if (args.length > 1) {
- usage();
- }
-
- if (args.length == 1) {
- if (args[0].equals("-slow")) {
+ for(int i=0; i< args.length; i++) {
+ if (args[i].equals("-slow")) {
vboEnabled = false;
- } else {
- usage();
}
}
GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2));
@@ -138,9 +126,10 @@ public class VertexBufferObject extends Demo {
animator.start();
}
- private static void usage() {
- System.out.println("usage: java VertexBufferObject [-slow]");
- System.out.println("-slow flag starts up using data in the Java heap");
+ private static void usage(String[] args) {
+ System.err.println("Given args: "+Arrays.asList(args));
+ System.err.println("usage: java VertexBufferObject [-slow]");
+ System.err.println("-slow flag starts up using data in the Java heap");
System.exit(0);
}
diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java
index 9915fae..9b4b358 100644
--- a/src/demos/vertexProgRefract/VertexProgRefract.java
+++ b/src/demos/vertexProgRefract/VertexProgRefract.java
@@ -56,7 +56,6 @@ import java.awt.event.WindowEvent;
import java.io.IOException;
import javax.media.opengl.*;
import javax.media.opengl.awt.*;
-import javax.media.opengl.glu.GLU;
import com.jogamp.opengl.util.Animator;
import javax.swing.JOptionPane;
@@ -76,13 +75,6 @@ import javax.swing.JOptionPane;
public class VertexProgRefract extends Demo {
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);
-
GLCanvas canvas = new GLCanvas();
final VertexProgRefract demo = new VertexProgRefract();
@@ -127,7 +119,6 @@ public class VertexProgRefract extends Demo {
private int bunnydl;
private int obj;
- private GLU glu = new GLU();
private GLUT glut = new GLUT();
private GLAutoDrawable drawable;
diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java
index a9adb4e..8d45095 100644
--- a/src/demos/vertexProgWarp/VertexProgWarp.java
+++ b/src/demos/vertexProgWarp/VertexProgWarp.java
@@ -51,7 +51,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -61,7 +60,6 @@ import javax.media.opengl.awt.GLCanvas;
import javax.media.opengl.glu.GLU;
import javax.media.opengl.glu.GLUquadric;
import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.GLBuffers;
import javax.swing.JOptionPane;
@@ -76,23 +74,12 @@ import javax.swing.JOptionPane;
*/
public class VertexProgWarp extends Demo {
- private Frame frame;
- private Animator animator;
- private volatile boolean quit;
-
private GLAutoDrawable drawable;
private DurationTimer timer = new DurationTimer();
private boolean firstRender = true;
private int frameCount;
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 VertexProgWarp().run(args);
}
diff --git a/src/demos/xtrans/Main.java b/src/demos/xtrans/Main.java
index 3166121..783e7eb 100755
--- a/src/demos/xtrans/Main.java
+++ b/src/demos/xtrans/Main.java
@@ -47,8 +47,6 @@ import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.tree.*;
-import javax.media.opengl.GLProfile;
-
/** Demonstration showing off XTDesktopPane.
*
* @author Kenneth Russell
@@ -268,13 +266,6 @@ public class Main {
}
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 Main().run(args);
}
}
diff --git a/src/gleem/TestExaminerViewer.java b/src/gleem/TestExaminerViewer.java
index 712feec..03042ed 100644
--- a/src/gleem/TestExaminerViewer.java
+++ b/src/gleem/TestExaminerViewer.java
@@ -44,7 +44,6 @@ import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -150,7 +149,6 @@ public class TestExaminerViewer {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
Frame frame = new Frame("ExaminerViewer Test");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
diff --git a/src/gleem/TestHandleBox.java b/src/gleem/TestHandleBox.java
index 6e27441..13d0e74 100644
--- a/src/gleem/TestHandleBox.java
+++ b/src/gleem/TestHandleBox.java
@@ -44,7 +44,6 @@ import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -138,7 +137,6 @@ public class TestHandleBox {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
Frame frame = new Frame("HandleBox Test");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
diff --git a/src/gleem/TestMultiWin.java b/src/gleem/TestMultiWin.java
index 521f7db..39fee6b 100644
--- a/src/gleem/TestMultiWin.java
+++ b/src/gleem/TestMultiWin.java
@@ -45,7 +45,6 @@ import java.awt.Frame;
import java.awt.Point;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -167,7 +166,6 @@ public class TestMultiWin {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
// Instantiate HandleBoxManip
manip = new HandleBoxManip();
manip.setTranslation(new Vec3f(0, 0, -10));
diff --git a/src/gleem/TestTranslate1.java b/src/gleem/TestTranslate1.java
index 4945305..fae4366 100644
--- a/src/gleem/TestTranslate1.java
+++ b/src/gleem/TestTranslate1.java
@@ -44,7 +44,6 @@ import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -140,7 +139,6 @@ public class TestTranslate1 {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
Frame frame = new Frame("Translate1 Test");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
diff --git a/src/gleem/TestTranslate2.java b/src/gleem/TestTranslate2.java
index 5ec40a3..ea1ae0e 100644
--- a/src/gleem/TestTranslate2.java
+++ b/src/gleem/TestTranslate2.java
@@ -44,7 +44,6 @@ import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -140,7 +139,6 @@ public class TestTranslate2 {
}
public static void main(String[] args) {
- GLProfile.initSingleton(true);
Frame frame = new Frame("Translate2 Test");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
diff --git a/src/redbook/src/glredbook10/alpha.java b/src/redbook/src/glredbook10/alpha.java
index c040a41..6385c11 100644
--- a/src/redbook/src/glredbook10/alpha.java
+++ b/src/redbook/src/glredbook10/alpha.java
@@ -35,14 +35,6 @@ public class alpha//
* mode, and handle input events.
*/
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);
- GLProfile.initSingleton(false); // just lazy to touch all html/jnlp's
-
alpha demo = new alpha();
//
JFrame.setDefaultLookAndFeelDecorated(true);
diff --git a/src/redbook/src/glredbook1314/combiner.java b/src/redbook/src/glredbook1314/combiner.java
index 27cff3e..bf34c23 100644
--- a/src/redbook/src/glredbook1314/combiner.java
+++ b/src/redbook/src/glredbook1314/combiner.java
@@ -56,14 +56,6 @@ public class combiner//
}
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);
- GLProfile.initSingleton(false); // just lazy to touch all html/jnlp's
-
combiner demo = new combiner();
GLCapabilities caps = new GLCapabilities(null);
diff --git a/src/redbook/src/glredbook1314/fogcoord.java b/src/redbook/src/glredbook1314/fogcoord.java
index 19410de..a72273e 100644
--- a/src/redbook/src/glredbook1314/fogcoord.java
+++ b/src/redbook/src/glredbook1314/fogcoord.java
@@ -45,17 +45,6 @@ public class fogcoord//
}
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);
- GLProfile.initSingleton(false); // just lazy to touch all html/jnlp's
-
- GLCapabilities caps = new GLCapabilities(null);
- GLCanvas canvas = new GLCanvas(caps);
-
fogcoord demo = new fogcoord();
JFrame.setDefaultLookAndFeelDecorated(true);
diff --git a/src/redbook/src/glredbook1314/multisamp.java b/src/redbook/src/glredbook1314/multisamp.java
index f3212b7..16eb43c 100644
--- a/src/redbook/src/glredbook1314/multisamp.java
+++ b/src/redbook/src/glredbook1314/multisamp.java
@@ -39,14 +39,6 @@ public class multisamp //
}
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);
- GLProfile.initSingleton(false); // just lazy to touch all html/jnlp's
-
multisamp demo = new multisamp();
JFrame.setDefaultLookAndFeelDecorated(true);
diff --git a/src/redbook/src/glredbook1314/shadowmap.java b/src/redbook/src/glredbook1314/shadowmap.java
index 176d529..f20b9d2 100644
--- a/src/redbook/src/glredbook1314/shadowmap.java
+++ b/src/redbook/src/glredbook1314/shadowmap.java
@@ -72,14 +72,6 @@ public class shadowmap //
}
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);
- GLProfile.initSingleton(false); // just lazy to touch all html/jnlp's
-
new shadowmap().run();
}