本文整理汇总了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);
}
示例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);
}
示例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");
}
});
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}