/** Loads the libgdx native libraries if they have not already been loaded. */ static public synchronized void load () { if (nativesLoaded) return; nativesLoaded = true; if (disableNativesLoading) return; new SharedLibraryLoader().load("gdx"); } }
/** Loads the libgdx native libraries if they have not already been loaded. */ static public synchronized void load () { if (nativesLoaded) return; nativesLoaded = true; if (disableNativesLoading) return; new SharedLibraryLoader().load("gdx"); } }
/** Loads the Box2D native library and initializes the gdx-box2d extension. Must be called before any of the box2d * classes/methods can be used. Currently with the exception of the {@link World} class, which will also cause the Box2D * natives to be loaded. */ public static void init () { new SharedLibraryLoader().load("gdx-box2d"); }
public DesktopControllerManager () { new SharedLibraryLoader().load("gdx-controllers-desktop"); new OisControllers(this); }
/** Loads the native Bullet native library and initializes the gdx-bullet extension. Must be called before any of the bullet * classes/methods can be used. * @param useRefCounting Whether to use reference counting, causing object to be destroyed when no longer referenced. You must * use {@link BulletBase#obtain()} and {@link BulletBase#release()} when using reference counting. * @param logging Whether to log an error on potential errors in the application. */ public static void init (boolean useRefCounting, boolean logging) { Bullet.useRefCounting = useRefCounting; Bullet.enableLogging = logging; new SharedLibraryLoader().load("gdx-bullet"); final int version = LinearMath.btGetVersion(); if (version != VERSION) throw new GdxRuntimeException("Bullet binaries version (" + version + ") does not match source version (" + VERSION + ")"); }
/** Loads the native Bullet native library and initializes the gdx-bullet extension. Must be called before any of the bullet * classes/methods can be used. * @param useRefCounting Whether to use reference counting, causing object to be destroyed when no longer referenced. You must * use {@link BulletBase#obtain()} and {@link BulletBase#release()} when using reference counting. * @param logging Whether to log an error on potential errors in the application. */ public static void init (boolean useRefCounting, boolean logging) { Bullet.useRefCounting = useRefCounting; Bullet.enableLogging = logging; new SharedLibraryLoader().load("gdx-bullet"); final int version = LinearMath.btGetVersion(); if (version != VERSION) throw new GdxRuntimeException("Bullet binaries version (" + version + ") does not match source version (" + VERSION + ")"); }
public static void main (String[] args) throws Exception { DesktopControllersBuild.main(null); new SharedLibraryLoader("libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");
/** Extracts the LWJGL native libraries from the classpath and sets the "org.lwjgl.librarypath" system property. */ static public void load () { GdxNativesLoader.load(); if (GdxNativesLoader.disableNativesLoading) return; if (!load) return; SharedLibraryLoader loader = new SharedLibraryLoader(); File nativesDir = null; try { if (isWindows) { nativesDir = loader.extractFile(is64Bit ? "lwjgl64.dll" : "lwjgl.dll", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "OpenAL64.dll" : "OpenAL32.dll", nativesDir); } else if (isMac) { nativesDir = loader.extractFile("liblwjgl.dylib", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo("openal.dylib", nativesDir); } else if (isLinux) { nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir); } } catch (Throwable ex) { throw new GdxRuntimeException("Unable to extract LWJGL natives.", ex); } System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath()); load = false; } }
/** Extracts the LWJGL native libraries from the classpath and sets the "org.lwjgl.librarypath" system property. */ static public void load () { GdxNativesLoader.load(); if (GdxNativesLoader.disableNativesLoading) return; if (!load) return; SharedLibraryLoader loader = new SharedLibraryLoader(); File nativesDir = null; try { if (isWindows) { nativesDir = loader.extractFile(is64Bit ? "lwjgl64.dll" : "lwjgl.dll", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "OpenAL64.dll" : "OpenAL32.dll", nativesDir); } else if (isMac) { nativesDir = loader.extractFile("liblwjgl.dylib", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo("openal.dylib", nativesDir); } else if (isLinux) { nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir); } } catch (Throwable ex) { throw new GdxRuntimeException("Unable to extract LWJGL natives.", ex); } System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath()); load = false; } }
public static Library initFreeType() { new SharedLibraryLoader().load("gdx-freetype"); long address = initFreeTypeJni(); if(address == 0) throw new GdxRuntimeException("Couldn't initialize FreeType library, FreeType error code: " + getLastErrorCode()); else return new Library(address); }
public static Library initFreeType() { new SharedLibraryLoader().load("gdx-freetype"); long address = initFreeTypeJni(); if(address == 0) throw new GdxRuntimeException("Couldn't initialize FreeType library, FreeType error code: " + getLastErrorCode()); else return new Library(address); }
/** Loads the libgdx native libraries if they have not already been loaded. */ static public synchronized void load () { if (nativesLoaded) return; nativesLoaded = true; if (disableNativesLoading) return; new SharedLibraryLoader().load("gdx"); } }
/** Loads the Box2D native library and initializes the gdx-box2d extension. Must be called before any of the box2d * classes/methods can be used. Currently with the exception of the {@link World} class, which will also cause the Box2D * natives to be loaded. */ public static void init () { new SharedLibraryLoader().load("gdx-box2d"); }
public DesktopControllerManager () { new SharedLibraryLoader().load("gdx-controllers-desktop"); new OisControllers(this); }
/** Loads the native Bullet native library and initializes the gdx-bullet extension. Must be called before any of the bullet * classes/methods can be used. * @param useRefCounting Whether to use reference counting, causing object to be destroyed when no longer referenced. You must * use {@link BulletBase#obtain()} and {@link BulletBase#release()} when using reference counting. * @param logging Whether to log an error on potential errors in the application. */ public static void init (boolean useRefCounting, boolean logging) { Bullet.useRefCounting = useRefCounting; Bullet.enableLogging = logging; new SharedLibraryLoader().load("gdx-bullet"); final int version = LinearMath.btGetVersion(); if (version != VERSION) throw new GdxRuntimeException("Bullet binaries version (" + version + ") does not match source version (" + VERSION + ")"); }
public static void main (String[] args) throws Exception { DesktopControllersBuild.main(null); new SharedLibraryLoader("libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");
/** Extracts the LWJGL native libraries from the classpath and sets the "org.lwjgl.librarypath" system property. */ static public void load () { GdxNativesLoader.load(); if (GdxNativesLoader.disableNativesLoading) return; if (!load) return; SharedLibraryLoader loader = new SharedLibraryLoader(); File nativesDir = null; try { if (isWindows) { nativesDir = loader.extractFile(is64Bit ? "lwjgl64.dll" : "lwjgl.dll", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "OpenAL64.dll" : "OpenAL32.dll", nativesDir); } else if (isMac) { nativesDir = loader.extractFile("liblwjgl.dylib", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo("openal.dylib", nativesDir); } else if (isLinux) { nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile(); if (!LwjglApplicationConfiguration.disableAudio) loader.extractFileTo(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir); } } catch (Throwable ex) { throw new GdxRuntimeException("Unable to extract LWJGL natives.", ex); } System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath()); load = false; } }
public static Library initFreeType() { new SharedLibraryLoader().load("gdx-freetype"); long address = initFreeTypeJni(); if(address == 0) throw new GdxRuntimeException("Couldn't initialize FreeType library, FreeType error code: " + getLastErrorCode()); else return new Library(address); }