Search in sources :

Example 6 with LwjglApplication

use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project Entitas-Java by Rubentxu.

the class Pong method main.

public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "BASIC";
    config.width = SCREEN_WIDTH;
    config.height = SCREEN_HEIGHT;
    new LwjglApplication(new Pong(), config);
}
Also used : LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration)

Example 7 with LwjglApplication

use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project AmazingMaze by TheVirtualMachine.

the class DesktopLauncher method main.

public static void main(String[] arg) {
    System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    DisplayMode displayMode = LwjglApplicationConfiguration.getDesktopDisplayMode();
    config.setFromDisplayMode(displayMode);
    config.title = "Amazing Maze";
    config.vSyncEnabled = true;
    config.foregroundFPS = 0;
    config.addIcon("icons/128.png", FileType.Internal);
    config.addIcon("icons/32.png", FileType.Internal);
    config.addIcon("icons/16.png", FileType.Internal);
    new LwjglApplication(new AmazingMazeGame(), config);
}
Also used : DisplayMode(com.badlogic.gdx.Graphics.DisplayMode) AmazingMazeGame(ca.hiphiparray.amazingmaze.AmazingMazeGame) LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration)

Example 8 with LwjglApplication

use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project Catacomb-Snatch by Catacomb-Snatch.

the class DesktopLauncher method main.

public static void main(String[] arg) {
    System.out.println("Starting game in DESKTOP mode!");
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    // TODO Re-enable if it got fixed on all systems (currently throws a shader error)
    // config.useGL30 = true;
    config.title = "Catacomb Snatch";
    config.width = GAME_WIDTH;
    config.height = GAME_HEIGHT;
    new LwjglApplication(new CatacombSnatch(new PlatformDependent() {

        @Override
        public void create() {
            // Set game cursor
            try {
                int size = 16, center = (size / 2);
                IntBuffer buffer = BufferUtils.newIntBuffer(size * size);
                int x = 0, y = 0;
                for (int n = 0; n < buffer.limit(); n++) {
                    if ((x == center || y == center) && (x < center - 1 || y < center - 1 || x > center + 1 || y > center + 1)) {
                        buffer = buffer.put(n, 0xFFFFFFFF);
                    }
                    x++;
                    if (x == size) {
                        x = 0;
                        y++;
                    }
                }
                Mouse.setNativeCursor(new Cursor(size, size, center, center, 1, buffer, null));
            } catch (LWJGLException e) {
                System.err.print("Error setting native cursor!\n" + e);
            }
        }

        @Override
        public Object[] createPlatformObjects() {
            throw new UnsupportedOperationException("Unimplemented");
        }

        @Override
        public void dispose() {
        }
    }), config);
}
Also used : PlatformDependent(net.catacombsnatch.game.PlatformDependent) LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) CatacombSnatch(net.catacombsnatch.game.CatacombSnatch) IntBuffer(java.nio.IntBuffer) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration) Cursor(org.lwjgl.input.Cursor) LWJGLException(org.lwjgl.LWJGLException)

Example 9 with LwjglApplication

use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project Alkahest-Coffee by AlkahestDev.

the class ServerDesktop method main.

public static void main(String[] args) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    new LwjglApplication(new CoffeeServer(), config);
}
Also used : LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration) CoffeeServer(me.dumfing.server.CoffeeServer)

Example 10 with LwjglApplication

use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project bdx by GoranM.

the class DesktopLauncher method main.

public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = "Project Name";
    config.width = 666;
    config.height = 444;
    new LwjglApplication(new BdxApp(), config);
}
Also used : BdxApp(com.comp.proj.BdxApp) LwjglApplication(com.badlogic.gdx.backends.lwjgl.LwjglApplication) LwjglApplicationConfiguration(com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration)

Aggregations

LwjglApplication (com.badlogic.gdx.backends.lwjgl.LwjglApplication)20 LwjglApplicationConfiguration (com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration)19 GdxTest (com.badlogic.gdx.tests.utils.GdxTest)2 RubeLoaderTest (com.gushikustudios.rube.RubeLoaderTest)2 File (java.io.File)2 AmazingMazeGame (ca.hiphiparray.amazingmaze.AmazingMazeGame)1 ApplicationAdapter (com.badlogic.gdx.ApplicationAdapter)1 ApplicationListener (com.badlogic.gdx.ApplicationListener)1 DisplayMode (com.badlogic.gdx.Graphics.DisplayMode)1 FileHandle (com.badlogic.gdx.files.FileHandle)1 Color (com.badlogic.gdx.graphics.Color)1 PixmapPacker (com.badlogic.gdx.graphics.g2d.PixmapPacker)1 FreeTypeFontGenerator (com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator)1 BitmapFontWriter (com.badlogic.gdx.tools.bmfont.BitmapFontWriter)1 Settings (com.badlogic.gdx.tools.texturepacker.TexturePacker.Settings)1 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)1 BdxApp (com.comp.proj.BdxApp)1 MyFirstGame (com.mygdx.game.MyFirstGame)1 Main (io.github.voidzombie.tests.Main)1 IOException (java.io.IOException)1