@Override public void invoke(final long window, final int width, final int height) { settings.setResolution(width, height); listener.reshape(width, height); } });
@Override public void invoke(final long window, final int width, final int height) { settings.setResolution(width, height); listener.reshape(width, height); } });
@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); } }
@Override public void start(JmeContext.Type contextType){ AppSettings settings = new AppSettings(true); settings.setResolution(1024, 768); setSettings(settings); super.start(contextType); }
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(); }
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(); }
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); }
@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(); }
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() {
settings.setStencilBits(eglStencilBits); settings.setResolution(disp.getWidth(), disp.getHeight()); settings.setAudioRenderer(audioRendererType);
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);
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(),
settings.setResolution(videoMode.width(), videoMode.height());
settings.setResolution(videoMode.width(), videoMode.height());
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); }
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); }
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); }
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); }
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 }
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 }