aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-03 23:32:52 +0200
committerSven Gothel <[email protected]>2014-09-03 23:32:52 +0200
commit101e229fa2f15b3492889205884ca98b1e9b3fbd (patch)
tree8a951d842f17ca85f48cdd0a326d2d2c1060e696 /src/jogl/classes/javax
parent71b8203572bc1bd63540818a9de4f927b0abebb1 (diff)
Bug 1060 - Add GLProfile.isInitialized(): Returns true if JOGL has been initialized
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 5836e4c81..08712e488 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -128,6 +128,21 @@ public class GLProfile {
}
/**
+ * @return <code>true</code> if JOGL has been initialized, i.e. manually via {@link #initSingleton()} or implicit,
+ * otherwise returns <code>false</code>.
+ *
+ * @since 2.2.1
+ */
+ public static boolean isInitialized() {
+ initLock.lock();
+ try {
+ return initialized;
+ } finally {
+ initLock.unlock();
+ }
+ }
+
+ /**
* Static initialization of JOGL.
*
* <p>