/** * Set the mode of the context. If no context has been created through create(), the mode will * apply when create() is called. If mode.isFullscreenCapable() is true, the context will become a * fullscreen context and the display mode is switched to the mode given by getDisplayMode(). If * mode.isFullscreenCapable() is false, the context will become a windowed context with the * dimensions given in the mode returned by getDisplayMode(). The native cursor position is also * reset. * * @param mode The new display mode to set. Must be non-null. * @throws LWJGLException If the mode switch fails. */ public static void setDisplayModeAndFullscreen(DisplayMode mode) throws LWJGLException { setDisplayModeAndFullscreenInternal(mode.isFullscreenCapable(), mode); }
/** * Set the fullscreen mode of the context. If no context has been created through create(), the * mode will apply when create() is called. If fullscreen is true, the context will become a * fullscreen context and the display mode is switched to the mode given by getDisplayMode(). If * fullscreen is false, the context will become a windowed context with the dimensions given in * the mode returned by getDisplayMode(). The native cursor position is also reset. * * @param fullscreen Specify the fullscreen mode of the context. * @throws LWJGLException If fullscreen is true, and the current DisplayMode instance is not from * getAvailableDisplayModes() or if the mode switch fails. */ public static void setFullscreen(boolean fullscreen) throws LWJGLException { setDisplayModeAndFullscreenInternal(fullscreen, current_mode); }