Search in sources :

Example 1 with JglfwApplication

use of com.badlogic.gdx.backends.jglfw.JglfwApplication in project libgdx by libgdx.

the class JglfwTestStarter method runTest.

/** Runs the {@link GdxTest} with the given name.
	 * @param testName the name of a test class
	 * @return {@code true} if the test was found and run, {@code false} otherwise */
public static JglfwApplication runTest(String testName) {
    final GdxTest test = GdxTests.newTest(testName);
    if (test == null)
        throw new GdxRuntimeException("Test not found: " + testName);
    final JglfwApplicationConfiguration config = new JglfwApplicationConfiguration();
    config.width = 640;
    config.height = 480;
    config.title = testName;
    config.forceExit = false;
    return new JglfwApplication(test, config);
}
Also used : GdxRuntimeException(com.badlogic.gdx.utils.GdxRuntimeException) JglfwApplication(com.badlogic.gdx.backends.jglfw.JglfwApplication) GdxTest(com.badlogic.gdx.tests.utils.GdxTest) JglfwApplicationConfiguration(com.badlogic.gdx.backends.jglfw.JglfwApplicationConfiguration)

Example 2 with JglfwApplication

use of com.badlogic.gdx.backends.jglfw.JglfwApplication in project libgdx by libgdx.

the class JglfwDebugStarter method main.

public static void main(String[] argv) {
    // this is only here for me to debug native code faster
    new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
    new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
    new SharedLibraryLoader("../../extensions/gdx-freetype/libs/gdx-freetype-natives.jar").load("gdx-freetype");
    new SharedLibraryLoader("../../extensions/gdx-controllers/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");
    new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
    GdxTest test = new SuperKoalio();
    JglfwApplicationConfiguration config = new JglfwApplicationConfiguration();
    config.vSync = true;
    new JglfwApplication(test, config);
}
Also used : SharedLibraryLoader(com.badlogic.gdx.utils.SharedLibraryLoader) SuperKoalio(com.badlogic.gdx.tests.superkoalio.SuperKoalio) JglfwApplication(com.badlogic.gdx.backends.jglfw.JglfwApplication) GdxTest(com.badlogic.gdx.tests.utils.GdxTest) JglfwApplicationConfiguration(com.badlogic.gdx.backends.jglfw.JglfwApplicationConfiguration)

Aggregations

JglfwApplication (com.badlogic.gdx.backends.jglfw.JglfwApplication)2 JglfwApplicationConfiguration (com.badlogic.gdx.backends.jglfw.JglfwApplicationConfiguration)2 GdxTest (com.badlogic.gdx.tests.utils.GdxTest)2 SuperKoalio (com.badlogic.gdx.tests.superkoalio.SuperKoalio)1 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)1 SharedLibraryLoader (com.badlogic.gdx.utils.SharedLibraryLoader)1