summaryrefslogtreecommitdiffstats
path: root/src/demos/swt/Snippet209.java
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 /src/demos/swt/Snippet209.java
parent7bf502292901259eef302ef23b5c558b80f6b3f8 (diff)
Adding GLProfile.initSingleton() call, ensuring [multithreading] intitialization can be done in time
Diffstat (limited to 'src/demos/swt/Snippet209.java')
-rw-r--r--src/demos/swt/Snippet209.java3
1 files changed, 3 insertions, 0 deletions
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;