com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration Java Examples

The following examples show how to use com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AudioGdxSoundTest.java    From gdx-pd with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) 
{
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	
	new LwjglApplication(new Game(){
		@Override
		public void create() {
			
			// play a pd patch
			Pd.audio.create(new PdConfiguration());
			Pd.audio.open(Gdx.files.local("resources/test.pd"));
			
			// and sounds at the same time
			final Sound snd = Gdx.audio.newSound(Gdx.files.classpath("shotgun.wav"));
			snd.play();
			Gdx.input.setInputProcessor(new InputAdapter(){
				@Override
				public boolean touchDown(int screenX, int screenY, int pointer, int button) {
					snd.play();
					return true;
				}
			});
			
		}}, config);
	
}
 
Example #2
Source File: AudioGdxMusicTest.java    From gdx-pd with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) 
{
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	
	new LwjglApplication(new Game(){
		@Override
		public void create() {
			
			// play a music
			Music music = Gdx.audio.newMusic(Gdx.files.classpath("cloudconnected.ogg"));
			music.setVolume(0.3f);
			music.play();
			
			// and a pd patch at the same time
			Pd.audio.create(new PdConfiguration());
			Pd.audio.open(Gdx.files.local("resources/test.pd"));
			
		}}, config);
	
}
 
Example #3
Source File: Main.java    From cocos2d-java with MIT License 5 votes vote down vote up
public static void main(String[] args) {
	LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
	cfg.title = "SimpleGame";
	cfg.useGL20 = true;
	cfg.width = 852;
	cfg.height = 480;
	
	new AppDelegate();
	new LwjglApplication(Cocos2d.Game(), cfg);
}
 
Example #4
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #5
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #6
Source File: TalosDemo.java    From talos with Apache License 2.0 5 votes vote down vote up
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 400;
    config.height = 400;
    config.title = "Talos Demo";
    LwjglFrame frame = new LwjglFrame(new TalosDemo(), config);
}
 
Example #7
Source File: GraphDrawerTest.java    From shapedrawer with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 800;
    config.height = 800;
    config.samples = 4;
    new LwjglApplication(new GraphDrawerTest(), config);
}
 
Example #8
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #9
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #10
Source File: URacerDesktop.java    From uracer-kotd with Apache License 2.0 5 votes vote down vote up
public static void main (String[] argv) {
	int year = Calendar.getInstance().get(Calendar.YEAR);
	System.out.print(URacer.Name + " (" + URacer.versionInfo + ")\nCopyright (c) 2011-" + year + " Manuel Bua.\n\n");

	// load boot configuration, either from file or from defaults
	BootConfig boot = new BootConfig();

	// override boot config by command line flags, if any
	if (argv.length > 0) {
		if (!CommandLine.applyLaunchFlags(argv, boot)) {
			return;
		}
	} else {
		System.out.println("Try --help for a list of valid command-line switches.\n");
	}

	System.setProperty("org.lwjgl.opengl.Window.undecorated", "" + boot.getBoolean(BootConfigFlag.UNDECORATED));

	LwjglApplicationConfiguration config = createLwjglConfig(boot);

	System.out.print("Resolution set at " + (config.width + "x" + config.height) + " (x=" + boot.getWindowX() + ", y="
		+ boot.getWindowY() + ")\n");
	System.out.print("Vertical sync: " + (config.vSyncEnabled ? "Yes" : "No") + "\n");
	System.out.print("Fullscreen: " + (config.fullscreen ? "Yes" : "No") + "\n");
	System.out.print("Window decorations: " + (boot.getBoolean(BootConfigFlag.UNDECORATED) ? "No" : "Yes") + "\n");

	URacer uracer = new URacer(boot);
	LwjglApplication app = new LwjglApplication(uracer, config);

	URacerDesktopFinalizer finalizr = new URacerDesktopFinalizer(boot, (OpenALAudio)app.getAudio());
	uracer.setFinalizer(finalizr);

	if (!config.fullscreen) {
		Display.setLocation(boot.getWindowX(), boot.getWindowY());
	}
}
 
Example #11
Source File: DesktopLauncher.java    From Norii with Apache License 2.0 5 votes vote down vote up
public static void main(final String[] arg) {
	final LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.title = "Norii a turn based strategy game by Jelte";
	config.width = 580;
	config.height = 580;
	config.fullscreen = false;
	config.initialBackgroundColor = Color.BLACK;

	final Application app = new LwjglApplication(new Norii(), config);
	Gdx.app = app;
	Gdx.app.setLogLevel(Application.LOG_DEBUG);
}
 
Example #12
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #13
Source File: Runner.java    From cocos-ui-libgdx with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    //config.width = DemoGame.GAME_WIDTH;
    // config.height = DemoGame.GAME_HEIGHT;
    //以下作为assetmanager使用
    config.width = 1280;
    config.height = 720;
    new LwjglApplication(new DemoGame(), config);
}
 
Example #14
Source File: DesktopLauncher.java    From TerraLegion with MIT License 5 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	PhysicsGame.instantiateSettings();
	config.width = Settings.getWidth();
	config.height = Settings.getHeight();
	new LwjglApplication(new PhysicsGame(), config);
}
 
Example #15
Source File: DesktopLauncher.java    From killingspree with MIT License 5 votes vote down vote up
public static void main (String[] arg) {
		LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
		config.title = "Killing Spree";
		config.height = 720;
		config.width = 1280;
		config.vSyncEnabled = true;
//		config.fullscreen = true;
		new LwjglApplication(new KillingSpree(new DesktopServices()), config);
	}
 
Example #16
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #17
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #18
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #19
Source File: DesktopLauncher.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 480;
	config.height = 320;
	config.title = "Invaders";
	new LwjglApplication(new Invaders(), config);
}
 
Example #20
Source File: DS1Viewer.java    From riiablo with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
  config.title = "DS1 Viewer";
  config.resizable = true;
  config.width = 1280;
  config.height = 720;
  config.foregroundFPS = config.backgroundFPS = 144;
  DS1Viewer client = new DS1Viewer();
  new LwjglApplication(client, config);
}
 
Example #21
Source File: DirectionTool.java    From riiablo with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
  config.title = TAG;
  config.resizable = false;
  config.width = 256;
  config.height = 256;
  config.vSyncEnabled = false;
  config.foregroundFPS = config.backgroundFPS = 144;
  new LwjglApplication(new DirectionTool(), config);
}
 
Example #22
Source File: DesktopStarter.java    From fluid-simulator-v2 with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
		LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
		config.fullscreen = true;
		config.resizable = false;
		config.title = "Fluid Simulator v2.1";
		config.vSyncEnabled = true;
		config.width = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
		config.height = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
//		config.width = 800;
//		config.height = 480;
		config.useGL20 = true;
		new LwjglApplication(new FluidSimulatorStarter(), config);
	}
 
Example #23
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #24
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #25
Source File: DesktopLauncher.java    From ud406 with MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example #26
Source File: DesktopLauncher.java    From ud405 with MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new RectangularFlower(), config);
}
 
Example #27
Source File: DesktopLauncher.java    From ud405 with MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new CheckerboardGame(), config);
}
 
Example #28
Source File: ParticleControlTest.java    From talos with Apache License 2.0 4 votes vote down vote up
public static void main (String[] args) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 1280;
	config.height = 720;
	new LwjglApplication(new ParticleControlTest(), config);
}
 
Example #29
Source File: DesktopLauncher.java    From ud405 with MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new AccelerometerAxesGame(), config);
}
 
Example #30
Source File: DesktopLauncher.java    From ud405 with MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new IciclesGame(), config);
}