List of usage examples for com.badlogic.gdx.backends.lwjgl LwjglApplicationConfiguration setFromDisplayMode
public void setFromDisplayMode(DisplayMode mode)
From source file:ca.hiphiparray.amazingmaze.desktop.DesktopLauncher.java
License:Open Source License
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;/*w w w. java2s .c o m*/ 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); }
From source file:com.github.ykrasik.jaci.cli.libgdx.LibGdxCliExample.java
License:Apache License
public static void main(String[] args) { final LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); config.title = "Jerminal"; config.setFromDisplayMode(LwjglApplicationConfiguration.getDesktopDisplayMode()); config.fullscreen = false;//ww w.j av a2 s .c o m config.height -= 150; config.width -= 100; config.resizable = true; config.x = 50; config.y = 50; new LwjglApplication(new LibGdxCliExample(), config); }
From source file:com.github.ykrasik.jerminal.libgdx.JerminalLibGdxExample.java
License:Apache License
public static void main(String[] args) { final LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); config.title = "Jerminal"; config.setFromDisplayMode(LwjglApplicationConfiguration.getDesktopDisplayMode()); config.fullscreen = false;/*from w ww .j a v a 2s .com*/ config.height -= 150; config.width -= 100; config.resizable = true; config.x = 50; config.y = 50; new LwjglApplication(new JerminalLibGdxExample(), config); }
From source file:es.eucm.ead.engine.desktop.DesktopGame.java
License:Open Source License
/** * Creates the frame that contains the game * * @return//w w w . j a v a 2 s . c o m */ public JFrame start() { initInjector(); // Init class loader ReflectionClassLoader.init(new JavaReflectionClassLoader()); // Prepare Gdx configuration int width = windowWidth; int height = windowHeight; LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); cfg.title = ""; cfg.useGL20 = true; cfg.width = width; cfg.height = height; cfg.fullscreen = fullscreen; cfg.forceExit = this.exitAtClose; DesktopGUI gui = (DesktopGUI) injector.getInstance(GUI.class); final EAdEngine engine = (EAdEngine) injector.getInstance(ApplicationListener.class); engine.setDebug(debug); JFrame frame = null; if (cfg.fullscreen) { cfg.setFromDisplayMode(LwjglApplicationConfiguration.getDesktopDisplayMode()); new LwjglApplication(engine, cfg); } else { new LwjglApplication(engine, cfg, gui.createCanvas(width, height, exitAtClose)); frame = gui.getFrame(); } return frame; }