Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.SharedLibraryLoader


public class DesktopControllerManager implements ControllerManager {
  final Array<Controller> controllers = new Array();
  final Array<ControllerListener> listeners = new Array();

  public DesktopControllerManager () {
    new SharedLibraryLoader().load("gdx-controllers-desktop");
    new OisControllers(this);
  }
View Full Code Here


import com.badlogic.gdx.utils.SharedLibraryLoader;

public class OisTest {
  public static void main (String[] args) throws Exception {
    DesktopControllersBuild.main(null);
    new SharedLibraryLoader("libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");

    ApplicationAdapter app = new ApplicationAdapter() {
      Ois ois;

      public void create () {
View Full Code Here

   public static int FT_KERNING_DEFAULT = 0;
   public static int FT_KERNING_UNFITTED = 1;
   public static int FT_KERNING_UNSCALED = 2;
 
   public static Library initFreeType() {
     new SharedLibraryLoader().load("gdx-freetype");
     long address = initFreeTypeJni();
     if(address == 0) throw new GdxRuntimeException("Couldn't initialize FreeType library");
     else return new Library(address);
   }
View Full Code Here

  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.extractFile(is64Bit ? "OpenAL64.dll" : "OpenAL32.dll", nativesDir.getName());
      } else if (isMac) {
        File extractedFile = loader.extractFile("liblwjgl.jnilib", null);
        nativesDir = extractedFile.getParentFile();
        new FileHandle(extractedFile).copyTo(new FileHandle(new File(nativesDir, "liblwjgl.dylib")));
        if (!LwjglApplicationConfiguration.disableAudio) loader.extractFile("openal.dylib", nativesDir.getName());
      } else if (isLinux) {
        nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile();
        if (!LwjglApplicationConfiguration.disableAudio)
          loader.extractFile(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir.getName());
      }
    } catch (Throwable ex) {
      throw new GdxRuntimeException("Unable to extract LWJGL natives.", ex);
    }
    System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath());
View Full Code Here

  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.extractFile(is64Bit ? "OpenAL64.dll" : "OpenAL32.dll", nativesDir.getName());
      } else if (isMac) {
        File extractedFile = loader.extractFile("liblwjgl.jnilib", null);
        nativesDir = extractedFile.getParentFile();
        new FileHandle(extractedFile).copyTo(new FileHandle(new File(nativesDir, "liblwjgl.dylib")));
        if (!LwjglApplicationConfiguration.disableAudio) loader.extractFile("openal.dylib", nativesDir.getName());
      } else if (isLinux) {
        nativesDir = loader.extractFile(is64Bit ? "liblwjgl64.so" : "liblwjgl.so", null).getParentFile();
        if (!LwjglApplicationConfiguration.disableAudio)
          loader.extractFile(is64Bit ? "libopenal64.so" : "libopenal.so", nativesDir.getName());
      }
    } catch (Throwable ex) {
      throw new GdxRuntimeException("Unable to extract LWJGL natives.", ex);
    }
    System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath());
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.utils.SharedLibraryLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.