本文整理匯總了Java中com.jme3.system.AppSettings.setResolution方法的典型用法代碼示例。如果您正苦於以下問題:Java AppSettings.setResolution方法的具體用法?Java AppSettings.setResolution怎麽用?Java AppSettings.setResolution使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.jme3.system.AppSettings
的用法示例。
在下文中一共展示了AppSettings.setResolution方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException{
AppSettings settings = new AppSettings(true);
final Application app = new Application();
app.setSettings(settings);
app.start();
Thread.sleep(3000);
settings.setFullscreen(true);
settings.setResolution(-1, -1);
app.setSettings(settings);
app.restart();
Thread.sleep(3000);
app.stop();
}
示例2: init
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public void init(SurveyPlayback sim) {
mSettings = new AppSettings(true);
mSettings.setTitle("HELIOS - The Heidelberg LiDAR Operations Simulator");
mSettings.setVSync(true);
mSettings.setResolution(1680, 1050);
mSettings.setResolution(1280, 1024);
mSettings.setResolution(1600, 1024);
// setting.setResolution(1024,768);
mSettings.setResolution(1024,768);
mSettings.setSamples(4);
setSettings(mSettings);
setShowSettings(false);
// ATTENTION: This is REQUIRED to prevent freezing of the whole computer if the program loses focus!
// setPauseOnLostFocus() must be "false" since currently, setting it to "true" won't stop the actual simulation anyway.
setPauseOnLostFocus(false);
this.sim = sim;
}
示例3: visualize
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public void visualize() throws InterruptedException {
if (jmeApp != null) {
log.info("JmeApp already started");
return;
}
jmeApp = new TestJmeIMModel();
//jmeApp.setObjects(getCollisionObject());
//jmeApp.setShowSettings(false);
AppSettings settings = new AppSettings(true);
settings.setResolution(800,600);
//settings.setUseInput(false);
jmeApp.setSettings(settings);
jmeApp.setShowSettings(false);
jmeApp.setPauseOnLostFocus(false);
jmeApp.setService(this);
jmeApp.start();
//need to wait for jmeApp to be ready or the models won't load
synchronized (this) {
wait(5000);
}
//add the existing objects
jmeApp.addObject(collisionItems.getItems());
}
示例4: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args){
TestRenderToMemory app = new TestRenderToMemory();
app.setPauseOnLostFocus(false);
AppSettings settings = new AppSettings(true);
settings.setResolution(1, 1);
app.setSettings(settings);
app.start(Type.OffscreenSurface);
}
示例5: start
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void start(JmeContext.Type contextType){
AppSettings settings = new AppSettings(true);
settings.setResolution(1024, 768);
setSettings(settings);
super.start(contextType);
}
示例6: appReshape
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void appReshape(int width, int height) {
logger.log(Level.FINE, "JmeAppHarness reshape");
AppSettings settings = app.getContext().getSettings();
settings.setResolution(width, height);
if (renderer != null) {
app.reshape(width, height);
}
if (input != null) {
input.loadSettings(settings);
}
}
示例7: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setOpenCLSupport(true);
settings.setOpenCLPlatformChooser(UserPlatformChooser.class);
settings.setVSync(false);
settings.setResolution(1024, 768);
TestFluids2D app = new TestFluids2D();
app.setSettings(settings);
app.setShowSettings(true);
app.start();
}
示例8: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setResolution(640, 480);
settings.setSamples(4);
settings.setTitle("Projection");
settings.setFrameRate(40);
ProjectTest app = new ProjectTest();
app.setSettings(settings);
app.setShowSettings(false);
app.setPauseOnLostFocus(false);
app.start();
}
示例9: create
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
/**
* 創建遊戲,默認幀率60.
* @param appClass
* @param width
* @param height
*/
public static void create(String appClass, int width, int height) {
AppSettings settings = new AppSettings(true);
settings.setResolution(width, height);
settings.setFrameRate(60);
create(appClass, settings, new VBox());
}
示例10: start
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
private void start() {
AppSettings settings = new AppSettings(true);
settings.setResolution(1280, 720);
settings.setFrameRate(90);
settings.setSamples(4);
Jfx.create(Editor.class.getName(), settings);
Jfx.getMainFrame().setLocationRelativeTo(null);
Jfx.getMainFrame().setVisible(true);
Jfx.getMainFrame().setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
Jfx.getMainFrame().setIconImages(createIcons());
Jfx.getMainFrame().addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
super.windowClosing(e);
Quit.doQuit(); // 由Quicker負責退出
}
});
// 開始構建JFX界麵
// 這裏要等待JmeApp執行完simpleInit方法之後再開始執行Jfx UI,因為UI要依賴於JME的初始化
Jfx.runOnJme(() -> {
Jfx.runOnJfx(() -> {
UIManager.initializeLayout(Jfx.getJfxRoot());
});
});
}
示例11: start
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
@Override
public void start(Stage stage) throws Exception {
AppSettings settings = new AppSettings(true);
// 這裏必須把初始化時的分辨率調高一些,最好剛好或大於整個屏幕,因為一些jmeContext(如LwjglOffscreenBuffer)會
// 使用分辨率來初始化Pbuffer,但是Pbuffer在運行過程無法重建,即大小無法調整,這會導致如果一開始太小則當窗口調整
// 時,渲染窗口生成的圖片無法覆蓋整個窗口。
settings.setResolution(width, height);
settings.setFrameRate(30);
// setKeepResolution保持分辨率不要太大,以節省性能。
jfxView = JfxSystem.startApp(TestEditor.class.getName(), settings);
jfxView.setResolutionLimit(width, height);
jfxView.setUseDepthBuffer(true);
// Button btn = new Button();
// btn.setText("Stop JFX Application");
// btn.setOnAction(e -> {
// Platform.exit();
// });
StackPane root = new StackPane();
root.setBackground(Background.EMPTY);
root.getChildren().add(jfxView);
// root.getChildren().add(btn);
Scene scene = new Scene(root);
scene.setFill(new Color(0f, 0f, 0f, 0f));
jfxView.fitWidthProperty().bind(scene.widthProperty());
jfxView.fitHeightProperty().bind(scene.heightProperty());
jfxView.setEffect(new DropShadow());
stage.setTitle("Hello World!");
stage.setScene(scene);
stage.initStyle(StageStyle.TRANSPARENT);
stage.show();
}
示例12: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setResolution(1024, 768);
settings.setFrameRate(60);
Editor app = new Editor();
app.setSettings(settings);
app.setShowSettings(false);
app.start();
}
示例13: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
GrassTest app = new GrassTest();
app.getStateManager().detach(app.getStateManager().getState(FlyCamAppState.class));
AppSettings settings = new AppSettings(true);
settings.setUseJoysticks(true);
settings.setResolution(1280, 800);
settings.setVSync(true);
app.setSettings(settings);
app.setShowSettings(true);
app.start();
}
示例14: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
SimpleChaseCameraTest app = new SimpleChaseCameraTest();
AppSettings aps = new AppSettings(true);
aps.setVSync(true);
aps.setResolution(800, 600);
app.setSettings(aps);
app.start();
}
示例15: main
import com.jme3.system.AppSettings; //導入方法依賴的package包/類
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setTitle("Circle");
settings.setResolution(800, 600);
Circle2dTest app = new Circle2dTest();
app.setSettings(settings);
app.setPauseOnLostFocus(false);
app.setShowSettings(false);
app.start();
}