当前位置: 首页>>代码示例>>Java>>正文


Java Lwjgl3ApplicationConfiguration类代码示例

本文整理汇总了Java中com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration的典型用法代码示例。如果您正苦于以下问题:Java Lwjgl3ApplicationConfiguration类的具体用法?Java Lwjgl3ApplicationConfiguration怎么用?Java Lwjgl3ApplicationConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Lwjgl3ApplicationConfiguration类属于com.badlogic.gdx.backends.lwjgl3包,在下文中一共展示了Lwjgl3ApplicationConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main(String[] arg) {
	Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
	config.useOpenGL3(true, 3, 2);
	config.setBackBufferConfig(8, 8, 8, 8, 16, 0, 2);
	new Lwjgl3Application(new Launcher(), config);
}
 
开发者ID:ahmetkasif,项目名称:Longest-Century,代码行数:8,代码来源:DesktopLauncher.java

示例2: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main (String[] arg) {		
	final Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	config.setWindowedMode(1280, 720);
	config.setDecorated(true);
	config.useVsync(true);		
	config.setTitle("RavTech");
	
	DesktopEngineConfiguration engineConfiguration = new DesktopEngineConfiguration();			
	engineConfiguration.remoteEdit = false;
	
	final RavTech ravtech = new RavTech(engineConfiguration);			
	HookApi.addHook("onBoot", new Hook() {
		  @Override
		  public void run() {
			  RavTech.files.loadAsset("map.scene", Scene.class);
			  RavTech.files.finishLoading();
			  RavTech.currentScene = RavTech.files.getAsset("map.scene", Scene.class);	  
		  }
	  });
	
	new Lwjgl3Application(ravtech, config);
}
 
开发者ID:Quexten,项目名称:RavTech,代码行数:23,代码来源:DesktopLauncher.java

示例3: start

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
/**
 * @throws InitException If a fatal error occurs during initialization.
 */
public void start() throws InitException {
    DesktopGdxFileSystem gdxFileSystem = openResourceFileSystem(new File("."));
    IWritableFileSystem outputFileSystem = new DesktopOutputFileSystem(FileType.Local, "save/");

    final Launcher launcher = new Launcher(gdxFileSystem, outputFileSystem) {
        @Override
        public void create() {
            DesktopGraphicsUtil.setWindowIcon(gdxFileSystem);
            windowedSize = DesktopGraphicsUtil.limitInitialWindowSize(Gdx.graphics);

            super.create();
        }

        @Override
        public void resize(int width, int height) {
            super.resize(width, height);

            if (!Gdx.graphics.isFullscreen()) {
                windowedSize = Dim.of(width, height);
            }
        }

        @Override
        protected void handleInput(INativeInput input) {
            super.handleInput(input);

            DesktopLauncher.this.handleInput(input);
        }
    };

    NovelPrefsStore prefs = launcher.loadPreferences();
    handleCommandlineOptions(prefs);

    Lwjgl3ApplicationConfiguration config = createConfig(launcher, prefs);
    Lwjgl3Application app = new Lwjgl3Application(launcher, config);
    app.addLifecycleListener(new LifecycleListener() {
        @Override
        public void resume() {
            LOG.info("App resume");
        }

        @Override
        public void pause() {
            LOG.info("App pause");
        }

        @Override
        public void dispose() {
            LOG.info("App dispose");
        }
    });
}
 
开发者ID:anonl,项目名称:nvlist,代码行数:56,代码来源:DesktopLauncher.java

示例4: createConfig

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
private Lwjgl3ApplicationConfiguration createConfig(Launcher launcher, NovelPrefsStore prefs) {
    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    config.useVsync(false);

    /*
     * We have to use HdpiMode.Pixels here. The default mode, HdpiMode.Logical, automatically scales 'logical'
     * pixels (window coordinates) to 'raw' pixels (OpenGL backbuffer coordinates). This causes problems when trying
     * to use Viewport to render to something other than the main window (like a FBO).
     */
    config.setHdpiMode(HdpiMode.Pixels);

    config.setTitle(prefs.get(NovelPrefs.TITLE));
    config.setWindowedMode(prefs.get(NovelPrefs.WIDTH), prefs.get(NovelPrefs.HEIGHT));
    config.setWindowListener(new Lwjgl3WindowAdapter() {
        @Override
        public boolean closeRequested() {
            return launcher.onCloseRequested();
        }
    });

    return config;
}
 
开发者ID:anonl,项目名称:nvlist,代码行数:23,代码来源:DesktopLauncher.java

示例5: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main(String[] arg)
{
    //BasicConfigurator.configure();
    /*LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 1024;
    config.height = 576;
    config.resizable = false;
    config.allowSoftwareMode = false;
    //config.vSyncEnabled = false;
    //config.foregroundFPS = 0;
    //config.backgroundFPS = 0;
    //config.addIcon("data/icons/desktop_mac.png", Files.FileType.Internal);
    //config.addIcon("data/icons/desktop_win_lin.png", Files.FileType.Internal);
    //config.addIcon("data/icons/desktop_win.png", Files.FileType.Internal);
    new LwjglApplication(new MaryoGame(), config);*/

    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    config.setWindowedMode(1024, 576);
    config.setResizable(false);
    config.useVsync(false);
    new Lwjgl3Application(new MaryoGame(null), config);
}
 
开发者ID:pedja1,项目名称:SMC-Android,代码行数:23,代码来源:DesktopLauncher.java

示例6: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main (String[] arg) {
	final MainEditor mainEditor = new MainEditor();
	Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	float scale = 1f;
	config.setTitle("UI Editor");
	config.setWindowIcon("logo.jpg");
	config.setWindowedMode((int)(1280*scale),(int)(720*scale));
	new Lwjgl3Application(mainEditor, config);
}
 
开发者ID:whitecostume,项目名称:libgdx_ui_editor,代码行数:10,代码来源:DesktopLauncher.java

示例7: DesktopLauncher

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
private DesktopLauncher(String startingMode) {
	windows = new HashMap<String, JDialog>();
	values = new HashMap<String, Map<String, Object>>();
	labels = new HashMap<String, List<JLabel>>();

	Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	config.setTitle("Tower Defense Galaxy");
	//config.setIdleFPS(60);
	//config.useVsync(false);
	//config.width = 1280;
	//config.height = 800;
	new Lwjgl3Application(new TDGalaxy(startingMode, this, this, this, this), config);
}
 
开发者ID:justinmarentette11,项目名称:Tower-Defense-Galaxy,代码行数:14,代码来源:DesktopLauncher.java

示例8: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main(String... args){
	// Create game instance
	TestGame game = new TestGame();

	Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	config.setTitle("Voice Chat Test");
	config.useVsync(false);
	config.setResizable(false);
	
	new Lwjgl3Application(game, config);

	// Done
	System.gc();
	System.exit(0);
}
 
开发者ID:Epicguru,项目名称:VoiceChat,代码行数:16,代码来源:TestGame.java

示例9: launchSplashScreen

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
private static void launchSplashScreen() {
    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    config.setTitle("Loading");
    config.setWindowIcon(WINDOW_ICON);
    config.setResizable(false);
    config.setWindowedMode(SplashScreen.SCREEN_WIDTH, SplashScreen.SCREEN_HEIGHT);
    config.setDecorated(false);
    config.setWindowPosition(-1, -1);
    new Lwjgl3Application(new SplashScreen(), config);
}
 
开发者ID:mbrlabs,项目名称:gdx-splash,代码行数:11,代码来源:Main.java

示例10: launchLockWindow

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
private static void launchLockWindow() {
    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    config.setTitle("Error");
    config.setWindowIcon(WINDOW_ICON);
    config.setResizable(false);
    config.setWindowedMode(LockWindow.WIDTH, LockWindow.HEIGHT);
    config.setWindowPosition(-1, -1);
    new Lwjgl3Application(new LockWindow(), config);
}
 
开发者ID:mbrlabs,项目名称:gdx-splash,代码行数:10,代码来源:Main.java

示例11: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
/**
 * The main method of the desktop client
 *
 * @param arg - the command line arguments to the program
 */
public static void main(String[] arg) {
    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    
    config.setTitle("SpaceGame");
    config.setHdpiMode(HdpiMode.Pixels);
    config.useVsync(true);
    config.setWindowedMode(1600, 900);
    
    List<String> args = Arrays.asList(arg);
    
    new Lwjgl3Application(new SpaceGame(SpaceGameClient.INSTANCE), config);
}
 
开发者ID:SergeySave,项目名称:SpaceGame,代码行数:18,代码来源:DesktopLauncher.java

示例12: getDefaultConfiguration

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
private static Lwjgl3ApplicationConfiguration getDefaultConfiguration() {
    Lwjgl3ApplicationConfiguration configuration = new Lwjgl3ApplicationConfiguration();
    configuration.setTitle("ColorGuard");
    configuration.useVsync(false);
    configuration.disableAudio(true);
    configuration.setIdleFPS(60);
    configuration.setHdpiMode(Lwjgl3ApplicationConfiguration.HdpiMode.Logical);
    configuration.setWindowedMode(800, 450);
    configuration.setWindowIcon("libgdx128.png", "libgdx64.png", "libgdx32.png", "libgdx16.png");
    return configuration;
}
 
开发者ID:tommyettinger,项目名称:ColorGuard,代码行数:12,代码来源:Lwjgl3Launcher.java

示例13: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main(String[] args) {
    Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
    config.setWindowedMode(840, 600);
    config.setTitle("Kreativity UI Demo");
    config.useVsync(false);
    new Lwjgl3Application(new UiDemo(), config);
}
 
开发者ID:alexpana,项目名称:kreativity-ui,代码行数:8,代码来源:UiDemo.java

示例14: defaultConfig

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static Lwjgl3ApplicationConfiguration defaultConfig() {
    Lwjgl3ApplicationConfiguration cfg = new Lwjgl3ApplicationConfiguration();
    cfg.setTitle("Argent game");
    cfg.setWindowedMode(1600, 900);
    cfg.useOpenGL3(true, 4, 2);
    cfg.useVsync(false);
    return cfg;
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:9,代码来源:Argent.java

示例15: main

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; //导入依赖的package包/类
public static void main (String[] arg) {
	Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
	config.setTitle("Maxit+");
	config.setWindowedMode(1280, 720);
	config.useVsync(true);
	config.useOpenGL3(true, 3, 2);
	config.setResizable(false);
	config.setWindowPosition(100, 48);
	config.setBackBufferConfig(8, 8, 8, 8, 16, 0, 4);
	
	new Lwjgl3Application(new Game(), config);
}
 
开发者ID:ahmetkasif,项目名称:KittenMaxit,代码行数:13,代码来源:DesktopLauncher.java


注:本文中的com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。