summaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/util/MainThread.java2
-rw-r--r--src/newt/classes/jogamp/newt/NEWTJNILibLoader.java24
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/ios/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java2
12 files changed, 33 insertions, 13 deletions
diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java
index 05df63794..9372de26c 100644
--- a/src/newt/classes/com/jogamp/newt/util/MainThread.java
+++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java
@@ -104,7 +104,7 @@ public class MainThread {
static {
NativeWindowFactory.initSingleton();
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
HINT_USE_MAIN_THREAD = !NativeWindowFactory.isAWTAvailable() ||
PropertyAccess.getBooleanProperty("newt.MainThread.force", true);
osType = Platform.getOSType();
diff --git a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
index 84e2167ee..fde3de222 100644
--- a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
+++ b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
@@ -47,12 +47,32 @@ import com.jogamp.common.os.Platform;
import com.jogamp.common.util.cache.TempJarCache;
public class NEWTJNILibLoader extends JNILibLoaderBase {
- public static boolean loadNEWT() {
+ /**
+ * Loads the NEWT native library for the main head display,
+ * i.e. X11 for Unix, GDI for Windows .. and so forth.
+ */
+ public static boolean loadNEWTHead() {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
@Override
public Boolean run() {
Platform.initSingleton();
- final String libName = "newt";
+ final String libName = "newt_head";
+ if( TempJarCache.isInitialized(true) && null == TempJarCache.findLibrary(libName) ) {
+ JNILibLoaderBase.addNativeJarLibsJoglCfg(new Class<?>[] { jogamp.nativewindow.Debug.class, jogamp.newt.Debug.class });
+ }
+ return Boolean.valueOf(loadLibrary(libName, false, NEWTJNILibLoader.class.getClassLoader()));
+ }
+ }).booleanValue();
+ }
+ /**
+ * Loads the NEWT native library for the drm/gbm display.
+ */
+ public static boolean loadNEWTDrmGbm() {
+ return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
+ public Boolean run() {
+ Platform.initSingleton();
+ final String libName = "newt_drm";
if( TempJarCache.isInitialized(true) && null == TempJarCache.findLibrary(libName) ) {
JNILibLoaderBase.addNativeJarLibsJoglCfg(new Class<?>[] { jogamp.nativewindow.Debug.class, jogamp.newt.Debug.class });
}
diff --git a/src/newt/classes/jogamp/newt/driver/android/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/android/DisplayDriver.java
index 216dccb2b..91a8d4dfe 100644
--- a/src/newt/classes/jogamp/newt/driver/android/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/android/DisplayDriver.java
@@ -37,7 +37,7 @@ import com.jogamp.opengl.egl.EGL;
public class DisplayDriver extends jogamp.newt.DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if (!WindowDriver.initIDs0()) {
throw new NativeWindowException("Failed to initialize Android NEWT Windowing library");
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java
index cd801e59a..a65bd1e4c 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java
@@ -45,7 +45,7 @@ import com.jogamp.opengl.egl.EGL;
public class DisplayDriver extends jogamp.newt.DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if (!WindowDriver.initIDs()) {
throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java
index 5e1e61407..8a29f96f6 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java
@@ -52,7 +52,7 @@ public class DisplayDriver extends DisplayImpl {
static final PNGPixelRect defaultPointerIconImage;
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
GLProfile.initSingleton();
if (!DisplayDriver.initIDs()) {
diff --git a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
index ea42c27af..19e44b830 100644
--- a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java
@@ -50,7 +50,7 @@ import jogamp.opengl.egl.EGLDisplayUtil;
public class DisplayDriver extends DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTDrmGbm();
GLProfile.initSingleton();
if (!DisplayDriver.initIDs()) {
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java
index 33712e35d..b92c355ef 100644
--- a/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java
@@ -41,7 +41,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl {
static int initCounter = 0;
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if (!ScreenDriver.initIDs()) {
throw new NativeWindowException("Failed to initialize GDL Screen jmethodIDs");
diff --git a/src/newt/classes/jogamp/newt/driver/ios/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/ios/DisplayDriver.java
index d2bb6de02..e5572f6f6 100644
--- a/src/newt/classes/jogamp/newt/driver/ios/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/ios/DisplayDriver.java
@@ -39,7 +39,7 @@ import jogamp.newt.NEWTJNILibLoader;
public class DisplayDriver extends DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if(!initUIApplication0()) {
throw new NativeWindowException("Failed to initialize native Application hook");
diff --git a/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java
index 6b28e94df..b704f8d40 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java
@@ -45,7 +45,7 @@ import jogamp.opengl.egl.EGLDisplayUtil;
public class DisplayDriver extends DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if (!WindowDriver.initIDs()) {
throw new NativeWindowException("Failed to initialize kd.Window jmethodIDs");
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
index 94001f440..59d3f0e40 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
@@ -59,7 +59,7 @@ public class DisplayDriver extends DisplayImpl {
private static final boolean USE_APPKIT_EDTUTIL;
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if(!initNSApplication0()) {
throw new NativeWindowException("Failed to initialize native Application hook");
diff --git a/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java
index 0bd7c5b2a..e9581772a 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java
@@ -60,7 +60,7 @@ public class DisplayDriver extends DisplayImpl {
private static RegisteredClassFactory sharedClassFactory;
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
{
final long[] _defaultIconHandle = { 0, 0 };
if( DisplayImpl.isPNGUtilAvailable() ) {
diff --git a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
index 9d89ba085..e0fd20e2b 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
@@ -50,7 +50,7 @@ import jogamp.newt.NEWTJNILibLoader;
public class DisplayDriver extends DisplayImpl {
static {
- NEWTJNILibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWTHead();
if ( !initIDs0(X11Util.XERROR_STACKDUMP) ) {
throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");