Java 类com.badlogic.gdx.backends.lwjgl.LwjglNativesLoader 实例源码

项目:MMORPG_Prototype    文件:HeadlessServerLauncher.java   
public static void main(String[] args)
  {
SpringApplication.run(HeadlessServerLauncher.class, args);

    ServerSettings.isHeadless = true;
    LwjglNativesLoader.load();
Gdx.files = new LwjglFiles();
HeadlessNativesLoader.load();
MockGraphics mockGraphics = new MockGraphics();
Gdx.graphics = mockGraphics;
HeadlessNet headlessNet = new HeadlessNet();
Gdx.net = headlessNet;
Gdx.gl = new NullGL20();
Gdx.gl20 = new NullGL20();
Gdx.gl30 = new NullGL30();
HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration();
new HeadlessApplication(new GameServer(), config);
  }
项目:ead    文件:RepoLibraryTest.java   
@Before
public void setup() {
    LwjglNativesLoader.load();
    MockApplication.initStatics();

    tempFolders = new Array<FileHandle>();

    setCommonProperty(RepoLibraryBuilder.VERSION, "testversion");
    setCommonProperty(THUMBNAILS, "");
    setCommonProperty(RESOURCES, "");

    outputFolder = FileHandle.tempDirectory("test-repolib");
    outputFolder.mkdirs();
    tempFolders.add(outputFolder);
    export(outputFolder.path());

    // Check element file
    FileHandle elementsSubFolder = outputFolder.child("elements");
    assertTrue(
            "Elements sub-folder does not exist or it's not a directory",
            elementsSubFolder.exists() && elementsSubFolder.isDirectory());

    FileHandle librariesFile = outputFolder.child("libraries");
    assertTrue(
            "Libraries sub-folder does not exist or it's not a directory",
            librariesFile.exists() && librariesFile.isDirectory());

    FileHandle previewFile = outputFolder.child("preview");
    assertTrue("Preview sub-folder does not exist or it's not a directory",
            previewFile.exists() && previewFile.isDirectory());
}
项目:shadow-engine    文件:ShadowJglfwApplication.java   
/**
 * Starts the game loop and initializes OpenAL and other H4X dependant
 * stuff as overriding initialization was impossible... H4X FTW!
 */
@Override
protected void start() {
    LwjglNativesLoader.load();

    audio = new OpenALAudio(audioDeviceSimultaneousSources, audioDeviceBufferCount,
            audioDeviceBufferSize);
    Gdx.audio = audio;

    hiddenFPS = config.hiddenFPS;
    foregroundFPS = config.foregroundFPS;
    backgroundFPS = config.backgroundFPS;

    super.start();
}