Example usage for com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplication

List of usage examples for com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplication

Introduction

In this page you can find the example usage for com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplication.

Prototype

public LwjglApplication(ApplicationListener listener, String title, int width, int height) 

Source Link

Usage

From source file:com.gmail.emersonmx.tictactoe.desktop.DesktopLauncher.java

License:Open Source License

public static void main(String[] arg) {
    new LwjglApplication(new TicTacToe(), "TicTacToe", TicTacToe.WINDOW_WIDTH, TicTacToe.WINDOW_HEIGHT);
}

From source file:com.netthreads.gdx.java.Box2DTestDesktop.java

License:Apache License

public static void main(String[] args) {
    // last parameter false = use OpenGL 1.1 and not 2.1+
    new LwjglApplication(new Box2DTest(), Box2DTest.APPLICATION_NAME, Box2DTest.DEFAULT_WIDTH,
            Box2DTest.DEFAULT_HEIGHT);
}

From source file:com.netthreads.gdx.java.Noiz2GDXDesktop.java

License:Apache License

public static void main(String[] args) {
    // last parameter false = use OpenGL 1.1 and not 2.1+
    new LwjglApplication(new Noiz2GDX(), APPLICATION_NAME, Noiz2GDX.DEFAULT_WIDTH, Noiz2GDX.DEFAULT_HEIGHT);
}

From source file:com.netthreads.gdx.java.SimpleShooterDesktop.java

License:Apache License

public static void main(String[] args) {
    // last parameter false = use OpenGL 1.1 and not 2.1+
    new LwjglApplication(new SimpleShooter(), APPLICATION_NAME, SimpleShooter.DEFAULT_WIDTH,
            SimpleShooter.DEFAULT_HEIGHT);
}

From source file:es.eucm.ead.editor.control.background.BackgroundTaskDemo.java

License:Open Source License

public static void main(String args[]) {
    new LwjglApplication(new BackgroundTaskDemo(), "Test for TextArea", 1000, 600);

}

From source file:javagdxdungeon.JavaGDXDungeon.java

/**
 * @param args the command line arguments
 *//*from w  w  w . j av a  2s . c  om*/

public static void main(String[] args) {
    // TODO code application logic here
    new LwjglApplication(new MainListener(), "Dungeon", VViewLength, HViewLength);
}

From source file:net.spookygames.gdx.sfx.demo.GdxSfxDemoDesktop.java

License:Open Source License

public static void main(String[] args) throws Exception {
    DesktopAudioDurationResolver.initialize();
    new LwjglApplication(new GdxSfxDemo(new DesktopFileChooser()), "", 800, 600);
}

From source file:old.tnf.ptm.desktop.SolDesktop.java

License:Apache License

public static void main(String[] argv) {
    if (false) {/*from   w  ww.  j  a  va  2s. c om*/
        new LwjglApplication(new SoundTestListener(), "sound test", 800, 600);
        return;
    }

    LwjglApplicationConfiguration applicationConfig = new LwjglApplicationConfiguration();
    boolean devBuild = java.nio.file.Files.exists(Paths.get("devBuild"));
    if (devBuild) {
        DebugOptions.DEV_ROOT_PATH = "main" + File.separator; // Lets the game run from source without a tweaked working directory
        applicationConfig.vSyncEnabled = false; //Setting to false disables vertical sync
        applicationConfig.foregroundFPS = 0; //disables foreground fps throttling
        applicationConfig.backgroundFPS = 0; //disables background fps throttling
    }
    MyReader reader = new MyReader();
    DebugOptions.read(reader);

    if (DebugOptions.EMULATE_MOBILE) {
        applicationConfig.width = 640;
        applicationConfig.height = 480;
        applicationConfig.fullscreen = false;
    } else {
        GameOptions d = new GameOptions(false, reader);
        applicationConfig.width = d.x;
        applicationConfig.height = d.y;
        applicationConfig.fullscreen = d.fullscreen;
    }

    applicationConfig.title = "Path to Mani";
    if (DebugOptions.DEV_ROOT_PATH == null) {
        applicationConfig.addIcon("res/icon.png", Files.FileType.Internal);
    } else {
        applicationConfig.addIcon(DebugOptions.DEV_ROOT_PATH + "res/icon.png", Files.FileType.Absolute);
    }

    /*
    Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> {
    // Get the exception stack trace string
    StringWriter stringWriter = new StringWriter();
    PrintWriter printWriter = new PrintWriter(stringWriter);
    ex.printStackTrace(printWriter);
    String exceptionString = stringWriter.getBuffer().toString();
    logger.error("This exception was not caught:", ex);
            
    // Create a crash dump file
    String fileName = "crash-" + new SimpleDateFormat("yyyy-dd-MM_HH-mm-ss").format(new Date()) + ".log";
    List<String> lines = Collections.singletonList(exceptionString);
    Path logPath = new MyReader().create(fileName, lines).toAbsolutePath().getParent();
            
    // Run asynchronously so that the error message view is not blocked
    new Thread(() -> CrashReporter.report(ex, logPath)).start();
    });
    */

    new LwjglApplication(new PtmApplication(), applicationConfig);
}