summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-06-10 06:14:44 +0200
committerSven Gothel <[email protected]>2010-06-10 06:14:44 +0200
commit348c43a12199e71017767930b0b42d939db47312 (patch)
tree502a113716308414e1345413dd35072a4b66459f
parent7bf502292901259eef302ef23b5c558b80f6b3f8 (diff)
Adding GLProfile.initSingleton() call, ensuring [multithreading] intitialization can be done in time
-rw-r--r--java-dbg.sh7
-rw-r--r--java-win32-dbg.bat10
-rw-r--r--java-win32.bat10
-rw-r--r--make/make.jogl.all.win32.bat6
-rwxr-xr-xsrc/demos/applets/GearsApplet.java4
-rwxr-xr-xsrc/demos/applets/GearsJOALApplet.java4
-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.java3
-rwxr-xr-xsrc/demos/cubefbo/FBCubes.java4
-rwxr-xr-xsrc/demos/cubefbo/Main.java5
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen.java5
-rwxr-xr-xsrc/demos/fullscreen/GearsFullscreen2.java5
-rwxr-xr-xsrc/demos/gamma/TestGamma.java4
-rw-r--r--src/demos/gears/Gears.java3
-rwxr-xr-xsrc/demos/hdr/HDR.java3
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java4
-rw-r--r--src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java4
-rwxr-xr-xsrc/demos/j2d/CustomText.java4
-rwxr-xr-xsrc/demos/j2d/FlyingText.java4
-rwxr-xr-xsrc/demos/j2d/TestOverlay.java4
-rwxr-xr-xsrc/demos/j2d/TestTextRenderer.java4
-rwxr-xr-xsrc/demos/j2d/TestTextureRenderer.java3
-rwxr-xr-xsrc/demos/j2d/TextCube.java4
-rwxr-xr-xsrc/demos/j2d/TextFlow.java3
-rwxr-xr-xsrc/demos/misc/GLCapsTableDemo.java4
-rwxr-xr-xsrc/demos/misc/Picking.java3
-rwxr-xr-xsrc/demos/multisample/Multisample.java3
-rwxr-xr-xsrc/demos/nurbs/curveapp/CurveApp.java4
-rwxr-xr-xsrc/demos/nurbs/surfaceapp/SurfaceApp.java4
-rwxr-xr-xsrc/demos/printext/PrintExt.java4
-rw-r--r--src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java4
-rw-r--r--src/demos/swt/Snippet209.java3
-rw-r--r--src/demos/tess/Tess.java4
-rwxr-xr-xsrc/demos/testContextDestruction/TestContextDestruction.java4
-rw-r--r--src/demos/testContextSharing/TestContextSharing.java4
-rwxr-xr-xsrc/demos/texture/TestSubImage.java4
-rwxr-xr-xsrc/demos/texture/TestTexture.java4
-rw-r--r--src/demos/vertexArrayRange/VertexArrayRange.java4
-rw-r--r--src/demos/vertexBufferObject/VertexBufferObject.java4
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java3
-rw-r--r--src/demos/vertexProgWarp/VertexProgWarp.java4
-rw-r--r--src/gleem/TestExaminerViewer.java4
-rw-r--r--src/gleem/TestHandleBox.java4
-rw-r--r--src/gleem/TestMultiWin.java4
-rw-r--r--src/gleem/TestTranslate1.java4
-rw-r--r--src/gleem/TestTranslate2.java4
-rw-r--r--src/redbook/src/glredbook10/alpha.java5
-rw-r--r--src/redbook/src/glredbook1314/combiner.java3
-rw-r--r--src/redbook/src/glredbook1314/fogcoord.java5
-rw-r--r--src/redbook/src/glredbook1314/multisamp.java3
-rw-r--r--src/redbook/src/glredbook1314/shadowmap.java3
51 files changed, 197 insertions, 20 deletions
diff --git a/java-dbg.sh b/java-dbg.sh
index 455b8b6..8fdab6c 100644
--- a/java-dbg.sh
+++ b/java-dbg.sh
@@ -11,8 +11,9 @@ fi
if [ $CPOK -eq 0 ] ; then
echo No JOGL in CLASSPATH
else
- # java -Dgluegen.debug.ProcAddressHelper=true -Dgluegen.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all $* 2>&1 | tee java-dbg.log
- java -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all $* 2>&1 | tee java-dbg.log
- # java -Djogl.debug=all $* 2>&1 | tee java-dbg.log
+D_ARGS="-Djogamp.debug.JNILibLoader=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true -Djogl.debug.GLProfile=true"
+# D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Dnativewindow.debug=all"
+
+ java $D_ARGS $* 2>&1 | tee java-dbg.log
fi
diff --git a/java-win32-dbg.bat b/java-win32-dbg.bat
index 39be5d4..9de5f1f 100644
--- a/java-win32-dbg.bat
+++ b/java-win32-dbg.bat
@@ -1,11 +1,11 @@
-set J2RE_HOME=c:\jre6
-set JAVA_HOME=c:\jdk6
+set J2RE_HOME=c:\jre1.6.0_20_x32
+set JAVA_HOME=c:\jdk1.6.0_20_x32
-set JAR_DIR=jogl\lib
-set LIB_DIR=jogl\lib
+set JAR_DIR=..\jogl\build-win32\jar
+set LIB_DIR=..\jogl\build-win32\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;jogl-demos.jar;jogl-demos-util.jar;jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/java-win32.bat b/java-win32.bat
index 14de9fd..c9dc916 100644
--- a/java-win32.bat
+++ b/java-win32.bat
@@ -1,11 +1,11 @@
-set J2RE_HOME=c:\jre1.6.0_19
-set JAVA_HOME=c:\jdk1.6.0_19
+set J2RE_HOME=c:\jre1.6.0_20_x32
+set JAVA_HOME=c:\jdk1.6.0_20_x32
-set JAR_DIR=jogl\lib
-set LIB_DIR=jogl\lib
+set JAR_DIR=..\jogl\build-win32\jar
+set LIB_DIR=..\jogl\build-win32\lib
-set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;jogl-demos.jar;jogl-demos-util.jar;jogl-demos-data.jar
+set CP_ALL=.;%JAR_DIR%\jogl.all.jar;%JAR_DIR%\nativewindow.all.jar;%JAR_DIR%\newt.all.jar;%JAR_DIR%\gluegen-rt.jar;build-win32\jogl-demos.jar;build-win32\jogl-demos-util.jar;build-win32\jogl-demos-data.jar
echo CP_ALL %CP_ALL%
diff --git a/make/make.jogl.all.win32.bat b/make/make.jogl.all.win32.bat
index 5503d61..3165ba5 100644
--- a/make/make.jogl.all.win32.bat
+++ b/make/make.jogl.all.win32.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"
-set J2RE_HOME=c:\jre1.6.0_19
-set JAVA_HOME=c:\jdk1.6.0_19
+set J2RE_HOME=c:\jre1.6.0_20_x32
+set JAVA_HOME=c:\jdk1.6.0_20_x32
set ANT_PATH=C:\apache-ant-1.8.0
set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
@@ -10,4 +10,4 @@ set LIB_GEN=%THISDIR%\lib
set CLASSPATH=.;%THISDIR%\build-win32\classes
REM -Djogl.cg=1
-ant -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
+ant -Djogl.cg=1 -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
diff --git a/src/demos/applets/GearsApplet.java b/src/demos/applets/GearsApplet.java
index fc3d0ec..dd5183b 100755
--- a/src/demos/applets/GearsApplet.java
+++ b/src/demos/applets/GearsApplet.java
@@ -3,6 +3,7 @@ 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.Animator;
import com.jogamp.opengl.util.FPSAnimator;
@@ -11,6 +12,9 @@ import com.jogamp.opengl.util.FPSAnimator;
referenced from a web page via an &lt;applet&gt; tag. */
public class GearsApplet extends Applet {
+ static {
+ GLProfile.initSingleton();
+ }
private Animator animator;
public void init() {
diff --git a/src/demos/applets/GearsJOALApplet.java b/src/demos/applets/GearsJOALApplet.java
index 9cc8693..54ee99f 100755
--- a/src/demos/applets/GearsJOALApplet.java
+++ b/src/demos/applets/GearsJOALApplet.java
@@ -4,6 +4,7 @@ import demos.gears.Gears;
import java.applet.Applet;
import java.awt.EventQueue;
import java.awt.GridLayout;
+import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.Animator;
import com.jogamp.opengl.util.FPSAnimator;
@@ -15,6 +16,9 @@ import demos.devmaster.lesson1.SingleStaticSource;
must be referenced from a web page via an &lt;applet&gt; tag. */
public class GearsJOALApplet extends Applet {
+ static {
+ GLProfile.initSingleton();
+ }
private Animator animator;
public void init() {
diff --git a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
index 3579f27..db263af 100644
--- a/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
+++ b/src/demos/cg/runtime_ogl/cgGL_vertex_example.java
@@ -49,6 +49,9 @@ import java.io.*;
*/
public class cgGL_vertex_example implements GLEventListener
{
+ static {
+ GLProfile.initSingleton();
+ }
/******************************************************************************/
/*** Static Data ***/
@@ -271,8 +274,10 @@ public class cgGL_vertex_example implements GLEventListener
public static void main(String[] argv)
{
- Frame frame = new Frame("NVidia Cg Toolkit \"cgGL_vertex_example\" demo");
+ // GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+ // GLCanvas canvas = new GLCanvas(caps);
GLCanvas canvas = new GLCanvas();
+ Frame frame = new Frame("NVidia Cg Toolkit \"cgGL_vertex_example\" demo");
canvas.addGLEventListener(new cgGL_vertex_example());
frame.add(canvas);
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 b550324..6502720 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
@@ -53,6 +53,9 @@ import java.util.*;
*/
public class runtime_ogl_vertex_fragment implements GLEventListener
{
+ static {
+ GLProfile.initSingleton();
+ }
// Global variables: hold the Cg context that we're storing our programs
// in as well as handles to the vertex and fragment program used in this
diff --git a/src/demos/cubefbo/FBCubes.java b/src/demos/cubefbo/FBCubes.java
index 39494a0..99ed710 100755
--- a/src/demos/cubefbo/FBCubes.java
+++ b/src/demos/cubefbo/FBCubes.java
@@ -36,6 +36,7 @@ package demos.cubefbo;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
+import javax.media.opengl.GLProfile;
import javax.media.opengl.DebugGL2;
import javax.media.opengl.GL;
import javax.media.opengl.GL2ES1;
@@ -48,6 +49,9 @@ import com.jogamp.opengl.util.FBObject;
class FBCubes implements GLEventListener, MouseListener, MouseMotionListener {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int FBO_SIZE = 128;
diff --git a/src/demos/cubefbo/Main.java b/src/demos/cubefbo/Main.java
index 2d8a36b..054aea4 100755
--- a/src/demos/cubefbo/Main.java
+++ b/src/demos/cubefbo/Main.java
@@ -36,6 +36,7 @@ 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.Animator;
@@ -44,6 +45,10 @@ import com.jogamp.opengl.util.FPSAnimator;
public class Main {
+ static {
+ GLProfile.initSingleton();
+ }
+
public static void main(String[] args) {
GLCapabilities caps = new GLCapabilities(null);
diff --git a/src/demos/fullscreen/GearsFullscreen.java b/src/demos/fullscreen/GearsFullscreen.java
index 0dac67f..2fa9937 100755
--- a/src/demos/fullscreen/GearsFullscreen.java
+++ b/src/demos/fullscreen/GearsFullscreen.java
@@ -5,6 +5,7 @@ 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;
@@ -21,6 +22,10 @@ import com.jogamp.opengl.util.Animator;
*/
public class GearsFullscreen {
+ static {
+ GLProfile.initSingleton();
+ }
+
private GraphicsDevice dev;
private DisplayMode origMode;
private boolean fullScreen;
diff --git a/src/demos/fullscreen/GearsFullscreen2.java b/src/demos/fullscreen/GearsFullscreen2.java
index 38911a4..1984acc 100755
--- a/src/demos/fullscreen/GearsFullscreen2.java
+++ b/src/demos/fullscreen/GearsFullscreen2.java
@@ -10,6 +10,7 @@ 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;
@@ -30,6 +31,10 @@ import javax.swing.ToolTipManager;
*/
public class GearsFullscreen2 {
+ static {
+ GLProfile.initSingleton();
+ }
+
private GraphicsDevice dev;
private DisplayMode origMode;
private boolean fullScreen;
diff --git a/src/demos/gamma/TestGamma.java b/src/demos/gamma/TestGamma.java
index 4dff454..fc6a34f 100755
--- a/src/demos/gamma/TestGamma.java
+++ b/src/demos/gamma/TestGamma.java
@@ -51,6 +51,10 @@ import com.jogamp.opengl.util.Gamma;
public class TestGamma implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
+
private static void usage() {
System.out.println("Usage: java TestGamma [gamma value] [brightness value] [contrast value]");
System.exit(1);
diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java
index 853444d..33446c7 100644
--- a/src/demos/gears/Gears.java
+++ b/src/demos/gears/Gears.java
@@ -28,6 +28,9 @@ import com.jogamp.opengl.util.Animator;
public class Gears implements GLEventListener, MouseListener, MouseMotionListener {
public static void main(String[] args) {
+ // RTFM .. essential for multithreading.
+ GLProfile.initSingleton();
+
Frame frame = new Frame("Gear Demo");
GLCanvas canvas = new GLCanvas();
// GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java
index 900d7f3..d4748b4 100755
--- a/src/demos/hdr/HDR.java
+++ b/src/demos/hdr/HDR.java
@@ -49,6 +49,9 @@ import javax.swing.JOptionPane;
*/
public class HDR extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
private static String[] defaultArgs = {
"demos/data/images/stpeters_cross.hdr",
"512",
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
index 0873d63..b22073a 100644
--- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
+++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
@@ -55,6 +55,7 @@ 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.GL;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
@@ -80,6 +81,9 @@ import javax.swing.JOptionPane;
*/
public class HWShadowmapsSimple extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
final GLCanvas canvas = new GLCanvas();
final HWShadowmapsSimple demo = new HWShadowmapsSimple();
diff --git a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
index e445b39..49404b3 100644
--- a/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
+++ b/src/demos/infiniteShadowVolumes/InfiniteShadowVolumes.java
@@ -55,6 +55,7 @@ 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;
@@ -84,6 +85,9 @@ import javax.media.opengl.glu.GLU;
*/
public class InfiniteShadowVolumes extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
GLCapabilities caps = new GLCapabilities(null);
caps.setStencilBits(16);
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java
index b5a4f57..86a423f 100755
--- a/src/demos/j2d/CustomText.java
+++ b/src/demos/j2d/CustomText.java
@@ -69,6 +69,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;
@@ -85,6 +86,9 @@ import javax.swing.JPanel;
to do text filled with a linear Java 2D gradient. */
public class CustomText extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
JFrame frame = new JFrame("Custom Text");
frame.getContentPane().setLayout(new BorderLayout());
diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java
index 9648d4f..d5a83a6 100755
--- a/src/demos/j2d/FlyingText.java
+++ b/src/demos/j2d/FlyingText.java
@@ -65,6 +65,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;
@@ -86,6 +87,9 @@ import javax.swing.event.ChangeListener;
shadow effect. */
public class FlyingText extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
JFrame frame = new JFrame("Flying Text");
diff --git a/src/demos/j2d/TestOverlay.java b/src/demos/j2d/TestOverlay.java
index 13cb39e..28c30fa 100755
--- a/src/demos/j2d/TestOverlay.java
+++ b/src/demos/j2d/TestOverlay.java
@@ -54,6 +54,7 @@ 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;
@@ -65,6 +66,9 @@ import com.jogamp.opengl.util.Animator;
with moving Java 2D-rendered text on top. */
public class TestOverlay implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
Frame frame = new Frame("Java 2D Overlay Test");
GLCapabilities caps = new GLCapabilities(null);
diff --git a/src/demos/j2d/TestTextRenderer.java b/src/demos/j2d/TestTextRenderer.java
index 5d93558..d5ec735 100755
--- a/src/demos/j2d/TestTextRenderer.java
+++ b/src/demos/j2d/TestTextRenderer.java
@@ -50,6 +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.GLProfile;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
@@ -63,6 +64,9 @@ import com.jogamp.opengl.util.Animator;
with moving Java 2D-rendered text on top. */
public class TestTextRenderer implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
Frame frame = new Frame("Text Renderer Test");
diff --git a/src/demos/j2d/TestTextureRenderer.java b/src/demos/j2d/TestTextureRenderer.java
index 60bb3a4..87baa1d 100755
--- a/src/demos/j2d/TestTextureRenderer.java
+++ b/src/demos/j2d/TestTextureRenderer.java
@@ -70,6 +70,9 @@ import com.jogamp.opengl.util.Animator;
underneath with moving Java 2D-rendered text on top. */
public class TestTextureRenderer implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
diff --git a/src/demos/j2d/TextCube.java b/src/demos/j2d/TextCube.java
index 63ad427..3433463 100755
--- a/src/demos/j2d/TextCube.java
+++ b/src/demos/j2d/TextCube.java
@@ -52,7 +52,6 @@ import java.awt.event.WindowEvent;
import java.awt.geom.Rectangle2D;
import javax.media.opengl.GL;
import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
import javax.media.opengl.GL2ES1;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
@@ -66,6 +65,9 @@ import com.jogamp.opengl.util.Animator;
/** Shows how to place 2D text in 3D using the TextRenderer. */
public class TextCube extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
private float xAng;
private float yAng;
private GLU glu = new GLU();
diff --git a/src/demos/j2d/TextFlow.java b/src/demos/j2d/TextFlow.java
index 972618a..32c7600 100755
--- a/src/demos/j2d/TextFlow.java
+++ b/src/demos/j2d/TextFlow.java
@@ -74,6 +74,9 @@ import com.jogamp.opengl.util.Animator;
screen. */
public class TextFlow extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
diff --git a/src/demos/misc/GLCapsTableDemo.java b/src/demos/misc/GLCapsTableDemo.java
index d4c652a..daa6b45 100755
--- a/src/demos/misc/GLCapsTableDemo.java
+++ b/src/demos/misc/GLCapsTableDemo.java
@@ -15,6 +15,7 @@ import java.awt.event.ActionListener;
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;
@@ -50,6 +51,9 @@ public class GLCapsTableDemo
implements
GLCapabilitiesChooser
{
+ static {
+ GLProfile.initSingleton();
+ }
private String[] colNames =
{"Pfd", "H/W", "DblBfr", "Stereo", // index, hwaccel, double, stereo
"CBits", "cR", "cG", "cB", "cA", // color bits
diff --git a/src/demos/misc/Picking.java b/src/demos/misc/Picking.java
index 1ba5f3e..472ed95 100755
--- a/src/demos/misc/Picking.java
+++ b/src/demos/misc/Picking.java
@@ -22,6 +22,9 @@ import com.jogamp.opengl.util.Animator;
public class Picking
{
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args)
{
new Picking();
diff --git a/src/demos/multisample/Multisample.java b/src/demos/multisample/Multisample.java
index 1c3c9ab..8e7facf 100755
--- a/src/demos/multisample/Multisample.java
+++ b/src/demos/multisample/Multisample.java
@@ -45,6 +45,9 @@ import javax.media.opengl.*;
import javax.media.opengl.awt.GLCanvas;
public class Multisample {
+ static {
+ GLProfile.initSingleton();
+ }
private GLCanvas canvas;
// Simple class to warn if results are not going to be as expected
diff --git a/src/demos/nurbs/curveapp/CurveApp.java b/src/demos/nurbs/curveapp/CurveApp.java
index ff70f68..e125f62 100755
--- a/src/demos/nurbs/curveapp/CurveApp.java
+++ b/src/demos/nurbs/curveapp/CurveApp.java
@@ -9,6 +9,7 @@ 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.swing.ButtonGroup;
import javax.swing.ImageIcon;
@@ -40,6 +41,9 @@ import demos.nurbs.knotslidercomponent.JKnotSlider;
@SuppressWarnings("serial")
public class CurveApp extends JFrame implements ActionListener
{
+ static {
+ GLProfile.initSingleton();
+ }
/**
* Name of X-coord editing component of actually selected control point
diff --git a/src/demos/nurbs/surfaceapp/SurfaceApp.java b/src/demos/nurbs/surfaceapp/SurfaceApp.java
index 4018967..c19e8c6 100755
--- a/src/demos/nurbs/surfaceapp/SurfaceApp.java
+++ b/src/demos/nurbs/surfaceapp/SurfaceApp.java
@@ -31,6 +31,7 @@ import javax.swing.ToolTipManager;
import demos.nurbs.icons.*;
import demos.nurbs.knotslidercomponent.JKnotSlider;
+import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
/**
@@ -44,6 +45,9 @@ import javax.media.opengl.awt.GLCanvas;
@SuppressWarnings("serial")
public class SurfaceApp extends JFrame implements ActionListener
{
+ static {
+ GLProfile.initSingleton();
+ }
/**
* X-coord editing component name
diff --git a/src/demos/printext/PrintExt.java b/src/demos/printext/PrintExt.java
index d2abe17..5ab5b42 100755
--- a/src/demos/printext/PrintExt.java
+++ b/src/demos/printext/PrintExt.java
@@ -6,6 +6,7 @@
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;
@@ -14,6 +15,9 @@ import javax.media.opengl.awt.GLCanvas;
public class PrintExt {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
Frame frame = new Frame();
GLCanvas canvas = new GLCanvas();
diff --git a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
index d0e73ae..e939718 100644
--- a/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
+++ b/src/demos/proceduralTexturePhysics/ProceduralTexturePhysics.java
@@ -50,6 +50,7 @@ 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;
@@ -74,6 +75,9 @@ import javax.swing.JOptionPane;
*
*/
public class ProceduralTexturePhysics extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
GLCanvas canvas = new GLCanvas();
diff --git a/src/demos/swt/Snippet209.java b/src/demos/swt/Snippet209.java
index f75d59d..1deb1c4 100644
--- a/src/demos/swt/Snippet209.java
+++ b/src/demos/swt/Snippet209.java
@@ -34,6 +34,9 @@ import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.glu.GLU;
public class Snippet209 {
+ static {
+ GLProfile.initSingleton();
+ }
static void drawTorus(GL2 gl, float r, float R, int nsides, int rings) {
float ringDelta = 2.0f * (float) Math.PI / rings;
float sideDelta = 2.0f * (float) Math.PI / nsides;
diff --git a/src/demos/tess/Tess.java b/src/demos/tess/Tess.java
index 1137c15..8688570 100644
--- a/src/demos/tess/Tess.java
+++ b/src/demos/tess/Tess.java
@@ -45,6 +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;
@@ -73,6 +74,9 @@ import javax.media.opengl.glu.GLUtessellator;
public class Tess {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
try {
Frame frame = new Frame("Tess Demo");
diff --git a/src/demos/testContextDestruction/TestContextDestruction.java b/src/demos/testContextDestruction/TestContextDestruction.java
index f1e8649..b2f2571 100755
--- a/src/demos/testContextDestruction/TestContextDestruction.java
+++ b/src/demos/testContextDestruction/TestContextDestruction.java
@@ -50,6 +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;
@@ -67,6 +68,9 @@ import javax.swing.JFrame;
as a GLCanvas is added to and removed from its parent container. */
public class TestContextDestruction {
+ static {
+ GLProfile.initSingleton();
+ }
private int gearDisplayList;
private Frame frame1, frame2;
private Component frame1ContainedComponent;
diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java
index 84faf6f..9e6dcce 100644
--- a/src/demos/testContextSharing/TestContextSharing.java
+++ b/src/demos/testContextSharing/TestContextSharing.java
@@ -42,6 +42,7 @@ 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;
@@ -54,6 +55,9 @@ import javax.media.opengl.awt.GLCanvas;
/** A simple demonstration of sharing of display lists between drawables. */
public class TestContextSharing {
+ static {
+ GLProfile.initSingleton();
+ }
private int gearDisplayList;
private Frame delayedFrame;
diff --git a/src/demos/texture/TestSubImage.java b/src/demos/texture/TestSubImage.java
index 498428c..8f04e4a 100755
--- a/src/demos/texture/TestSubImage.java
+++ b/src/demos/texture/TestSubImage.java
@@ -60,6 +60,7 @@ 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;
@@ -84,6 +85,9 @@ import javax.swing.KeyStroke;
Texture.updateSubImage(). */
public class TestSubImage {
+ static {
+ GLProfile.initSingleton();
+ }
private boolean haveForcedImageType;
private int forcedImageType;
private List imageTypeMenuItems = new ArrayList();
diff --git a/src/demos/texture/TestTexture.java b/src/demos/texture/TestTexture.java
index 6d39bbc..7524cd6 100755
--- a/src/demos/texture/TestTexture.java
+++ b/src/demos/texture/TestTexture.java
@@ -50,6 +50,7 @@ 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;
@@ -72,6 +73,9 @@ import javax.swing.KeyStroke;
/** Demonstrates simple use of the TextureIO texture loader. */
public class TestTexture implements GLEventListener {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
new TestTexture().run(args);
}
diff --git a/src/demos/vertexArrayRange/VertexArrayRange.java b/src/demos/vertexArrayRange/VertexArrayRange.java
index c97428b..b41de6e 100644
--- a/src/demos/vertexArrayRange/VertexArrayRange.java
+++ b/src/demos/vertexArrayRange/VertexArrayRange.java
@@ -45,6 +45,7 @@ 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;
@@ -88,6 +89,9 @@ import javax.swing.JOptionPane;
respectively. </P> */
public class VertexArrayRange extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
boolean startSlow = false;
diff --git a/src/demos/vertexBufferObject/VertexBufferObject.java b/src/demos/vertexBufferObject/VertexBufferObject.java
index f06f266..28c9e0e 100644
--- a/src/demos/vertexBufferObject/VertexBufferObject.java
+++ b/src/demos/vertexBufferObject/VertexBufferObject.java
@@ -47,6 +47,7 @@ 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.GLCapabilities;
import javax.media.opengl.GL2ES1;
@@ -85,6 +86,9 @@ import javax.swing.JOptionPane;
*/
public class VertexBufferObject extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java
index 65b914c..99cf05e 100644
--- a/src/demos/vertexProgRefract/VertexProgRefract.java
+++ b/src/demos/vertexProgRefract/VertexProgRefract.java
@@ -75,6 +75,9 @@ import javax.swing.JOptionPane;
*/
public class VertexProgRefract extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
public static void main(String[] args) {
GLCanvas canvas = new GLCanvas();
diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java
index e13656f..181d9ff 100644
--- a/src/demos/vertexProgWarp/VertexProgWarp.java
+++ b/src/demos/vertexProgWarp/VertexProgWarp.java
@@ -51,6 +51,7 @@ 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;
@@ -75,6 +76,9 @@ import javax.swing.JOptionPane;
*/
public class VertexProgWarp extends Demo {
+ static {
+ GLProfile.initSingleton();
+ }
private Frame frame;
private Animator animator;
private volatile boolean quit;
diff --git a/src/gleem/TestExaminerViewer.java b/src/gleem/TestExaminerViewer.java
index aae755a..e7d0838 100644
--- a/src/gleem/TestExaminerViewer.java
+++ b/src/gleem/TestExaminerViewer.java
@@ -44,6 +44,7 @@ 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;
@@ -58,6 +59,9 @@ import javax.media.opengl.glu.GLU;
/** Tests the Examiner Viewer. */
public class TestExaminerViewer {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
diff --git a/src/gleem/TestHandleBox.java b/src/gleem/TestHandleBox.java
index 8be4a7d..76583f3 100644
--- a/src/gleem/TestHandleBox.java
+++ b/src/gleem/TestHandleBox.java
@@ -44,6 +44,7 @@ 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;
@@ -57,6 +58,9 @@ import javax.media.opengl.glu.GLU;
/** Tests the HandleBox Manip. */
public class TestHandleBox {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
diff --git a/src/gleem/TestMultiWin.java b/src/gleem/TestMultiWin.java
index 39fee6b..0c81b71 100644
--- a/src/gleem/TestMultiWin.java
+++ b/src/gleem/TestMultiWin.java
@@ -45,6 +45,7 @@ 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;
@@ -59,6 +60,9 @@ import javax.media.opengl.glu.GLU;
/** Tests viewing manipulators in multiple winodws. */
public class TestMultiWin {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
diff --git a/src/gleem/TestTranslate1.java b/src/gleem/TestTranslate1.java
index fae4366..b61747c 100644
--- a/src/gleem/TestTranslate1.java
+++ b/src/gleem/TestTranslate1.java
@@ -44,6 +44,7 @@ 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;
@@ -58,6 +59,9 @@ import javax.media.opengl.glu.GLU;
/** Tests the Translate1 Manip. */
public class TestTranslate1 {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
diff --git a/src/gleem/TestTranslate2.java b/src/gleem/TestTranslate2.java
index ea1ae0e..2795817 100644
--- a/src/gleem/TestTranslate2.java
+++ b/src/gleem/TestTranslate2.java
@@ -44,6 +44,7 @@ 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;
@@ -58,6 +59,9 @@ import javax.media.opengl.glu.GLU;
/** Tests the Translate2 Manip. */
public class TestTranslate2 {
+ static {
+ GLProfile.initSingleton();
+ }
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
diff --git a/src/redbook/src/glredbook10/alpha.java b/src/redbook/src/glredbook10/alpha.java
index a207bdc..0c1a653 100644
--- a/src/redbook/src/glredbook10/alpha.java
+++ b/src/redbook/src/glredbook10/alpha.java
@@ -19,6 +19,9 @@ import javax.media.opengl.glu.GLU;
public class alpha//
extends GLSkeleton<GLCanvas>
implements GLEventListener, KeyListener {
+ static {
+ GLProfile.initSingleton();
+ }
@Override
protected GLCanvas createDrawable() {
@@ -152,4 +155,4 @@ public class alpha//
* Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
*
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */ \ No newline at end of file
+ */
diff --git a/src/redbook/src/glredbook1314/combiner.java b/src/redbook/src/glredbook1314/combiner.java
index bf34c23..6c50d3e 100644
--- a/src/redbook/src/glredbook1314/combiner.java
+++ b/src/redbook/src/glredbook1314/combiner.java
@@ -30,6 +30,9 @@ import javax.media.opengl.glu.GLU;
public class combiner//
extends GLSkeleton<GLJPanel>
implements GLEventListener, KeyListener {
+ static {
+ GLProfile.initSingleton();
+ }
private GLU glu;
private static final int imageWidth = 8;
private static final int imageHeight = 8;
diff --git a/src/redbook/src/glredbook1314/fogcoord.java b/src/redbook/src/glredbook1314/fogcoord.java
index b40dca9..4375d80 100644
--- a/src/redbook/src/glredbook1314/fogcoord.java
+++ b/src/redbook/src/glredbook1314/fogcoord.java
@@ -29,6 +29,9 @@ public class fogcoord//
extends GLSkeleton<GLCanvas>
implements GLEventListener, KeyListener {
+ static {
+ GLProfile.initSingleton();
+ }
private GLU glu;
private float f1, f2, f3;
private KeyEvent key;
@@ -187,4 +190,4 @@ public class fogcoord//
public void dispose(GLAutoDrawable arg0) {
}
-}// \ No newline at end of file
+}//
diff --git a/src/redbook/src/glredbook1314/multisamp.java b/src/redbook/src/glredbook1314/multisamp.java
index 16eb43c..4aa4c3f 100644
--- a/src/redbook/src/glredbook1314/multisamp.java
+++ b/src/redbook/src/glredbook1314/multisamp.java
@@ -23,6 +23,9 @@ import javax.media.opengl.glu.GLU;
public class multisamp //
extends GLSkeleton<GLCanvas>
implements GLEventListener, KeyListener {
+ static {
+ GLProfile.initSingleton();
+ }
private GLU glu;
private boolean bgtoggle = true;
diff --git a/src/redbook/src/glredbook1314/shadowmap.java b/src/redbook/src/glredbook1314/shadowmap.java
index f20b9d2..952145c 100644
--- a/src/redbook/src/glredbook1314/shadowmap.java
+++ b/src/redbook/src/glredbook1314/shadowmap.java
@@ -20,6 +20,9 @@ import javax.media.opengl.glu.GLU;
public class shadowmap //
extends GLSkeleton<GLCanvas>
implements GLEventListener, KeyListener {
+ static {
+ GLProfile.initSingleton();
+ }
private GLU glu;
private GLUT glut;
private FPSAnimator animator;