From 0906140a18690a9dced8dec12dfdd8cf4c95a4df Mon Sep 17 00:00:00 2001 From: sg215889 Date: Fri, 24 Jul 2009 07:29:28 -0700 Subject: Add: Extended support for CVM crosscompile: - Clean up X11 dependency - NativeWindow: - Seperate X11 out of core. - Add nativewindow.x11.jar and nativewindow.x11.cdc.jar - Newt: - Seperate X11,win,osx out of core. - Add newt.x11.jar, newt.win.jar, newt.osx.jar and the CDC variants Fix: External Context & Drawable (X11 and Windows) - Properly fetch current context values (ctx, display, drawable, ..) - Create GraphicsConfiguration based on the given pixelformat/FBConfig Fix: Java2D OpenGL Usage - Using the external context as shared for the external drawable - JAWTUtil: Skip locking in case of OGL-Flush-Queue - TODO: Windows FBO still does not work .. (X11 is fine) --- src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java') diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java index 11575ab65..f4c8944df 100644 --- a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java +++ b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java @@ -56,12 +56,14 @@ public class AWTUtil { static { lockedToolkit = false; headlessMode = GraphicsEnvironment.isHeadless(); - try { - j2dClazz = Class.forName("com.sun.opengl.impl.awt.Java2D"); - isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null); - isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null); - j2dOk = true; - } catch (Exception e) {} + if(!headlessMode) { + try { + j2dClazz = Class.forName("com.sun.opengl.impl.awt.Java2D"); + isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null); + isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null); + j2dOk = true; + } catch (Exception e) {} + } } private static boolean lockedToolkit; @@ -117,7 +119,7 @@ public class AWTUtil { } public static boolean isToolkitLocked() { - return lockedToolkit; + return JAWTUtil.isToolkitLocked(); } } -- cgit v1.2.3