本文整理了Java中com.jme3.system.AppSettings.setResolution()
方法的一些代码示例,展示了AppSettings.setResolution()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.setResolution()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:setResolution
[英]Set the resolution for the rendering display
[中]设置渲染显示的分辨率
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void invoke(final long window, final int width, final int height) {
settings.setResolution(width, height);
listener.reshape(width, height);
}
});
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void invoke(final long window, final int width, final int height) {
settings.setResolution(width, height);
listener.reshape(width, height);
}
});
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
logger.log(Level.FINE, "GL Surface changed, width: {0} height: {1}", new Object[]{width, height});
// update the application settings with the new resolution
settings.setResolution(width, height);
// reload settings in androidInput so the correct touch event scaling can be
// calculated in case the surface resolution is different than the view
androidInput.loadSettings(settings);
// if the application has already been initialized (ie renderable is set)
// then call reshape so the app can adjust to the new resolution.
if (renderable.get()) {
logger.log(Level.FINE, "App already initialized, calling reshape");
listener.reshape(width, height);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void start(JmeContext.Type contextType){
AppSettings settings = new AppSettings(true);
settings.setResolution(1024, 768);
setSettings(settings);
super.start(contextType);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public static void main(String[] args) throws InterruptedException{
System.out.println("Creating application..");
LegacyApplication app = new LegacyApplication();
System.out.println("Starting application in LWJGL mode..");
app.start();
System.out.println("Waiting 5 seconds");
Thread.sleep(5000);
System.out.println("Closing application..");
app.stop();
Thread.sleep(2000);
System.out.println("Starting in fullscreen mode");
app = new LegacyApplication();
AppSettings settings = new AppSettings(true);
settings.setFullscreen(true);
settings.setResolution(-1,-1); // current width/height
app.setSettings(settings);
app.start();
Thread.sleep(5000);
app.stop();
Thread.sleep(2000);
System.out.println("Creating offscreen buffer application");
app = new LegacyApplication();
app.start(Type.OffscreenSurface);
Thread.sleep(3000);
System.out.println("Destroying offscreen buffer");
app.stop();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public static void main(String[] args) throws InterruptedException{
AppSettings settings = new AppSettings(true);
final LegacyApplication app = new LegacyApplication();
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();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
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);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void runLoop(){
// This method is overriden to do restart
if (needRestart.getAndSet(false)) {
try {
createContext(settings);
} catch (LWJGLException ex) {
logger.log(Level.SEVERE, "Failed to set display settings!", ex);
}
listener.reshape(settings.getWidth(), settings.getHeight());
logger.fine("Display restarted.");
} else if (Display.wasResized()) {
int newWidth = Display.getWidth();
int newHeight = Display.getHeight();
settings.setResolution(newWidth, newHeight);
listener.reshape(newWidth, newHeight);
}
super.runLoop();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public static void main(String[] args) {
TestBatchNodeCluster app = new TestBatchNodeCluster();
settingst = new AppSettings(true);
//settingst.setFrameRate(75);
settingst.setResolution(640, 480);
settingst.setVSync(false);
settingst.setFullscreen(false);
app.setSettings(settingst);
app.setShowSettings(false);
app.start();
}
private ActionListener al = new ActionListener() {
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
settings.setStencilBits(eglStencilBits);
settings.setResolution(disp.getWidth(), disp.getHeight());
settings.setAudioRenderer(audioRendererType);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
windowSize.x = Math.max(windowSize.x * 2f, leftCamera.getWidth());
org.lwjgl.glfw.GLFW.glfwSetWindowSize(window, (int)windowSize.x, (int)windowSize.y);
environment.getApplication().getContext().getSettings().setResolution((int)windowSize.x, (int)windowSize.y);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
if (settings.getWidth() <= 0 || settings.getHeight() <= 0){
displayMode = Display.getDesktopDisplayMode();
settings.setResolution(displayMode.getWidth(), displayMode.getHeight());
}else if (settings.isFullscreen()){
displayMode = getFullscreenDisplayMode(settings.getWidth(), settings.getHeight(),
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
settings.setResolution(videoMode.width(), videoMode.height());
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
settings.setResolution(videoMode.width(), videoMode.height());
代码示例来源:origin: us.ihmc/IHMCPerception
public Render3dObject(File model)
{
Logger.getLogger("com.jme3").setLevel(Level.SEVERE);
this.model = model;
setPauseOnLostFocus(false);
AppSettings settings = new AppSettings(true);
settings.setAudioRenderer(null);
settings.setResolution(1, 1);
setSettings(settings);
// start(Type.OffscreenSurface);
}
代码示例来源:origin: us.ihmc/ihmc-perception
public Render3dObject(File model)
{
Logger.getLogger("com.jme3").setLevel(Level.SEVERE);
this.model = model;
setPauseOnLostFocus(false);
AppSettings settings = new AppSettings(true);
settings.setAudioRenderer(null);
settings.setResolution(1, 1);
setSettings(settings);
// start(Type.OffscreenSurface);
}
代码示例来源:origin: us.ihmc/IHMCPerception
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);
// app.start(Type.Display);
}
代码示例来源:origin: us.ihmc/ihmc-perception
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);
// app.start(Type.Display);
}
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
public static void main(String[] args)
{
GPUMeshDistortionTest app = new GPUMeshDistortionTest();
AppSettings settings = new AppSettings(true);
settings.setResolution(1280, 720);
app.setPauseOnLostFocus(false);
app.setShowSettings(false);
app.setSettings(settings);
app.start(); // start the game
}
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
public static void main(String[] args)
{
GPUMeshDistortionTest app = new GPUMeshDistortionTest();
AppSettings settings = new AppSettings(true);
settings.setResolution(1280, 720);
app.setPauseOnLostFocus(false);
app.setShowSettings(false);
app.setSettings(settings);
app.start(); // start the game
}
内容来源于网络,如有侵权,请联系作者删除!