diff options
author | Sven Gothel <[email protected]> | 2012-03-26 21:05:15 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-26 21:05:15 +0200 |
commit | 56434e48876a85e027bca5463afdc86929d025cf (patch) | |
tree | 7652bc6c3fd72aa8bebc1d3aaa5fd8b733e586c0 | |
parent | 375ab2da54ded1f3b3d90dc21b91fc6b87c64285 (diff) |
Adapt to gluegen commit 1c03dfd6d1939a46018583419956e350e531f4fe - Fix Bug 566
8 files changed, 43 insertions, 13 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java index ba159b82c..d901096bc 100644 --- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java @@ -29,8 +29,10 @@ package com.jogamp.opengl.cg; import com.jogamp.common.jvm.JNILibLoaderBase; +import com.jogamp.common.os.DynamicLibraryBundle; import com.jogamp.common.os.DynamicLibraryBundleInfo; import com.jogamp.common.os.Platform; +import com.jogamp.common.util.RunnableExecutor; import com.jogamp.common.util.cache.TempJarCache; import java.security.AccessController; @@ -66,25 +68,31 @@ public class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { } /** Make Cg symbols available to CgGL */ + @Override public boolean shallLinkGlobal() { return true; } /** default **/ + @Override public boolean shallLookupGlobal() { return false; } /** Tool has none **/ + @Override public final List<String> getToolGetProcAddressFuncNameList() { return null; } /** Tool has none **/ + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return 0; } + @Override public boolean useToolGetProcAdressFirst(String funcName) { return false; } + @Override public List<List<String>> getToolLibNames() { final List<List<String>> libsList = new ArrayList<List<String>>(); final List<String> libsCg = new ArrayList<String>(); @@ -98,9 +106,15 @@ public class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { return libsList; } + @Override public final List<String> getGlueLibNames() { return glueLibNames; } + + @Override + public RunnableExecutor getLibLoaderExecutor() { + return DynamicLibraryBundle.getDefaultRunnableExecutor(); + } } diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java index b009cf714..f77f1135b 100644 --- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java @@ -43,10 +43,12 @@ public abstract class DesktopGLDynamicLibraryBundleInfo extends GLDynamicLibrary super(); } + @Override public final List<String> getGlueLibNames() { return glueLibNames; } + @Override public boolean useToolGetProcAdressFirst(String funcName) { return true; } diff --git a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java index f03083ac6..4c82fc2b3 100644 --- a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java @@ -28,17 +28,25 @@ package jogamp.opengl; +import com.jogamp.common.os.DynamicLibraryBundle; import com.jogamp.common.os.DynamicLibraryBundleInfo; +import com.jogamp.common.util.RunnableExecutor; public abstract class GLDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { protected GLDynamicLibraryBundleInfo() { } /** default **/ + @Override public boolean shallLinkGlobal() { return false; } /** default **/ + @Override public boolean shallLookupGlobal() { return false; } + @Override + public RunnableExecutor getLibLoaderExecutor() { + return DynamicLibraryBundle.getDefaultRunnableExecutor(); + } } diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java index 73b7d197d..983f11133 100644 --- a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java +++ b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java @@ -41,10 +41,10 @@ package jogamp.opengl.awt; import java.awt.EventQueue; -import java.lang.reflect.InvocationTargetException; import javax.media.opengl.GLException; +import jogamp.common.awt.AWTEDTExecutor; import jogamp.opengl.GLWorkerThread; import jogamp.opengl.ThreadingImpl; import jogamp.opengl.ToolkitThreadingPlugin; @@ -100,17 +100,7 @@ public class AWTThreadingPlugin implements ToolkitThreadingPlugin { } } else { - try { - if(wait) { - EventQueue.invokeAndWait(r); - } else { - EventQueue.invokeLater(r); - } - } catch (InvocationTargetException e) { - throw new GLException(e.getTargetException()); - } catch (InterruptedException e) { - throw new GLException(e); - } + AWTEDTExecutor.singleton.invoke(wait, r); } break; diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java index 841d50f5f..fe9d7573d 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java @@ -59,8 +59,10 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle * http://dri.sourceforge.net/doc/DRIuserguide.html * </pre> */ + @Override public boolean shallLinkGlobal() { return true; } + @Override public boolean shallLookupGlobal() { if ( AndroidVersion.isAvailable ) { // Android requires global symbol lookup @@ -70,16 +72,19 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle return false; } + @Override public final List<String> getToolGetProcAddressFuncNameList() { List<String> res = new ArrayList<String>(); res.add("eglGetProcAddress"); return res; } + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return EGL.eglGetProcAddress(toolGetProcAddressHandle, funcName); } + @Override public final boolean useToolGetProcAdressFirst(String funcName) { if ( AndroidVersion.isAvailable ) { // Android requires global dlsym lookup @@ -105,7 +110,8 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle return eglLibNames; } - + + @Override public final List<String> getGlueLibNames() { return glueLibNames; } diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java index a5d3579bc..03ec94db6 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java @@ -36,6 +36,7 @@ public class MacOSXCGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBu super(); } + @Override public List<List<String>> getToolLibNames() { final List<List<String>> libsList = new ArrayList<List<String>>(); final List<String> libsGL = new ArrayList<String>(); @@ -45,6 +46,7 @@ public class MacOSXCGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBu return libsList; } + @Override public final List<String> getToolGetProcAddressFuncNameList() { return null; /** OSX manual says: NSImage use is discouraged @@ -53,6 +55,7 @@ public class MacOSXCGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBu return res; */ } + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return 0; /** OSX manual says: NSImage use is discouraged diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java index ea7dc81ec..a553bd4c2 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java @@ -36,6 +36,7 @@ public class WindowsWGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryB super(); } + @Override public List<List<String>> getToolLibNames() { final List<List<String>> libsList = new ArrayList<List<String>>(); final List<String> libsGL = new ArrayList<String>(); @@ -44,12 +45,14 @@ public class WindowsWGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryB return libsList; } + @Override public final List<String> getToolGetProcAddressFuncNameList() { List<String> res = new ArrayList<String>(); res.add("wglGetProcAddress"); return res; } + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return WGL.wglGetProcAddress(toolGetProcAddressHandle, funcName); } diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java index eb6c17cf6..108c157a8 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java @@ -36,6 +36,7 @@ public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundl super(); } + @Override public List<List<String>> getToolLibNames() { final List<List<String>> libsList = new ArrayList<List<String>>(); final List<String> libsGL = new ArrayList<String>(); @@ -65,8 +66,10 @@ public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundl * http://dri.sourceforge.net/doc/DRIuserguide.html * </pre> */ + @Override public boolean shallLinkGlobal() { return true; } + @Override public final List<String> getToolGetProcAddressFuncNameList() { List<String> res = new ArrayList<String>(); res.add("glXGetProcAddressARB"); @@ -74,6 +77,7 @@ public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundl return res; } + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return GLX.glXGetProcAddress(toolGetProcAddressHandle, funcName); } |