diff options
author | Sven Gothel <[email protected]> | 2010-06-10 06:14:44 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-06-10 06:14:44 +0200 |
commit | 348c43a12199e71017767930b0b42d939db47312 (patch) | |
tree | 502a113716308414e1345413dd35072a4b66459f /src/demos/j2d | |
parent | 7bf502292901259eef302ef23b5c558b80f6b3f8 (diff) |
Adding GLProfile.initSingleton() call, ensuring [multithreading] intitialization can be done in time
Diffstat (limited to 'src/demos/j2d')
-rwxr-xr-x | src/demos/j2d/CustomText.java | 4 | ||||
-rwxr-xr-x | src/demos/j2d/FlyingText.java | 4 | ||||
-rwxr-xr-x | src/demos/j2d/TestOverlay.java | 4 | ||||
-rwxr-xr-x | src/demos/j2d/TestTextRenderer.java | 4 | ||||
-rwxr-xr-x | src/demos/j2d/TestTextureRenderer.java | 3 | ||||
-rwxr-xr-x | src/demos/j2d/TextCube.java | 4 | ||||
-rwxr-xr-x | src/demos/j2d/TextFlow.java | 3 |
7 files changed, 25 insertions, 1 deletions
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) { |