本文整理汇总了Java中com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application类的典型用法代码示例。如果您正苦于以下问题:Java Lwjgl3Application类的具体用法?Java Lwjgl3Application怎么用?Java Lwjgl3Application使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Lwjgl3Application类属于com.badlogic.gdx.backends.lwjgl3包,在下文中一共展示了Lwjgl3Application类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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.Lwjgl3Application; //导入依赖的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.Lwjgl3Application; //导入依赖的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: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例5: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例6: DesktopLauncher
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例7: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例8: launchMainWindow
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的package包/类
private void launchMainWindow() {
// config for main window
Lwjgl3Application app = (Lwjgl3Application) Gdx.app;
Lwjgl3WindowConfiguration config = new Lwjgl3WindowConfiguration();
config.setTitle("GdxSplash");
config.setWindowIcon(Main.WINDOW_ICON);
config.setWindowedMode(1280, 720);
config.setWindowSizeLimits(1, 1, 9999, 9999);
// start main window and close this one
app.newWindow(new MainWindow(loadingTask.getTexture()), config);
window.closeWindow();
}
示例9: launchSplashScreen
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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.Lwjgl3Application; //导入依赖的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.Lwjgl3Application; //导入依赖的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: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例13: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的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);
}
示例14: createApplication
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的package包/类
private static Lwjgl3Application createApplication() {
return new Lwjgl3Application(new ColorGuardGame(), getDefaultConfiguration());
}
示例15: main
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; //导入依赖的package包/类
public static void main(String[] args) {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setWindowedMode(500, 500);
config.setTitle("Kreativity Renderer Demo");
new Lwjgl3Application(new RendererDemo(), config);
}