summaryrefslogtreecommitdiffstats
path: root/src/demos/testContextSharing
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/testContextSharing')
-rw-r--r--src/demos/testContextSharing/TestContextSharing.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/demos/testContextSharing/TestContextSharing.java b/src/demos/testContextSharing/TestContextSharing.java
index 9e6dcce..f34e91f 100644
--- a/src/demos/testContextSharing/TestContextSharing.java
+++ b/src/demos/testContextSharing/TestContextSharing.java
@@ -55,13 +55,17 @@ 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;
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);
}