参考:https ://code.google.com/p/libgdx/wiki/SimpleApp
package com.badlogic.drop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
public class Main {
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "Drop";
cfg.width = 768;
cfg.height = 1280;
new LwjglApplication(new Drop(), cfg);
}
}
在主项目中
Gdx.app.log("",Integer.toString(
Gdx.graphics.getHeight()));
输出 - 756