From 348c43a12199e71017767930b0b42d939db47312 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 10 Jun 2010 06:14:44 +0200 Subject: Adding GLProfile.initSingleton() call, ensuring [multithreading] intitialization can be done in time --- src/demos/cubefbo/FBCubes.java | 4 ++++ src/demos/cubefbo/Main.java | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src/demos/cubefbo') 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); -- cgit v1.2.3