summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-30 13:13:27 +0100
committerSven Gothel <[email protected]>2011-11-30 13:13:27 +0100
commitad0ba11b0a1d6cb4a113e467420f2f797f1d26cb (patch)
treefc263a43ea92791d5cb6e5439fc3c3669d3770de /src/nativewindow
parentb72ac8efaca45241a44dd631acb20a8c23ea2a7b (diff)
More Robust GLProfile Initialization ; Add NativeWindowFactory Shutdown
More Robust GLProfile Initialization - Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl., which may fail (See comment on Firefox/Chorme EGL deployed library for Windows). - If getWasSharedContextCreated(devide) fails, set respective factory availability to false, ie. hasDesktopGLFactory, hasEGLFactory, .. Add NativeWindowFactory Shutdown - Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index 9bc8ca9e4..39fe4fadc 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -265,6 +265,19 @@ public abstract class NativeWindowFactory {
}
}
+ public static synchronized void shutdown() {
+ if(initialized) {
+ initialized = false;
+ if(DEBUG) {
+ System.err.println(Thread.currentThread().getName()+" - NativeWindowFactory.shutdown() START");
+ }
+ // X11Util.shutdown(..) already called via GLDrawableFactory.shutdown() ..
+ if(DEBUG) {
+ System.err.println(Thread.currentThread().getName()+" - NativeWindowFactory.shutdown() END");
+ }
+ }
+ }
+
/** @return true if initialized with <b>{@link #initSingleton(boolean) initSingleton(firstUIActionOnProcess==true)}</b>,
otherwise false. */
public static boolean isFirstUIActionOnProcess() {