Class AppSettings
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,- Object> 
AppSettings provides a store of configuration
 to be used by the application.
 
 By default only the context uses the configuration,
 however the user may set and retrieve the settings as well.
 The settings can be stored either in the Java preferences
 (using save(java.lang.String)) or
 a .properties file (using save(java.io.OutputStream)).
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.This audio renderer has too many limitations.static final StringUse the OpenAL Soft based renderer for Android audio capabilities.static final StringUse JogAmp's JOAL as the audio renderer.static final StringUse JogAmp's JOGL as the display system, with the backward compatible profilestatic final StringUse JogAmp's JOGL as the display system, with the OpenGL forward compatible profilestatic final StringUse the LWJGL OpenAL based renderer for audio capabilities.static final StringUse LWJGL as the display system and force using the OpenGL2.0 renderer.static final StringDeprecated.Previously meant 3.2, use LWJGL_OPENGL32 or LWJGL_OPENGL30static final StringUse LWJGL as the display system and force using the core OpenGL3.0 renderer.static final StringUse LWJGL as the display system and force using the core OpenGL3.1 renderer.static final StringUse LWJGL as the display system and force using the core OpenGL3.2 renderer.static final StringUse LWJGL as the display system and force using the OpenGL3.3 renderer.static final StringDeprecated.Use LWJGL_OPENGL40static final StringUse LWJGL as the display system and force using the OpenGL4.0 renderer.static final StringUse LWJGL as the display system and force using the OpenGL4.1 renderer.static final StringUse LWJGL as the display system and force using the OpenGL4.2 renderer.static final StringUse LWJGL as the display system and force using the OpenGL4.3 renderer.static final StringUse LWJGL as the display system and force using the OpenGL4.4 renderer.static final StringUse LWJGL as the display system and force using the OpenGL4.5 renderer.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcopyFrom(AppSettings other) Copies all settings fromothertothisAppSettings.intAndroid Only Get the number of alpha bits for the surface view to use.Get the audio rendererintGet the bits per pixelbooleangetBoolean(String key) Get a boolean from the settings.booleanTests the state of the Center Window flag.intGet the number of depth bitsfloatGet a float from the settings.intGet the framerate.intGet the frequencyintGet the heightObject[]getIcons()Get the icon arrayintgetInteger(String key) Get an integer from the settings.intGet the heightintGet the widthGet the rendererintGet the number of samplesGet the settings dialog imageintGet the number of stencil bitsGet a string from the settings.getTitle()Get the application titleintgetWidth()Get the widthintGet the height of the windowintGet the width of the windowintGets the window's initial X position on the desktop.intGets the window's initial Y position on the desktop.booleanReturns true if keyboard emulation is enabled, false otherwise.booleanReturns true if mouse emulation is enabled, false otherwise.booleanbooleanbooleanGet the fullscreen statebooleanTest whether gamma correction should be enabled.booleanDetermine if the renderer will be run in Graphics Debug mode, which means every openGL call is checked and if it returns an error code, throw aRendererException.
 Without this, many openGL calls might fail without notice, so turning it on is recommended for development.booleanDetermine if the renderer will be run in Graphics Timing mode, which means every openGL call is checked and if it runs for longer than a millisecond, log it.
 It also keeps track of the time spent in GL Calls in general and displays them whenGL.resetStats()is called.booleanDetermine if the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one can trace what openGL commands where executed in which order by the engine.booleanbooleanDetermine if the display window can be resized by dragging its edges.booleanDetermine if the display context will swap buffers every frame.booleanDetermine whether to use full resolution framebuffers on Retina displays.booleanisVSync()Test whether vertical synchronization should be enabled.voidload(InputStream in) Loads the settings from the given properties input stream.voidLoads settings previously saved in the Java preferences.voidmergeFrom(AppSettings other) Same ascopyFrom(com.jme3.system.AppSettings), except doesn't overwrite settings that are already set.voidputBoolean(String key, boolean value) Set a boolean on the settings.voidSet a float on the settings.voidputInteger(String key, int value) Set an integer on the settings.voidSet a string on the settings.voidsave(OutputStream out) Saves all settings to the given properties output stream.voidSaves settings into the Java preferences.voidsetAlphaBits(int value) Android Only Sets the number of alpha bits to use.voidsetAudioRenderer(String audioRenderer) Set the audio renderer to use.voidsetBitsPerPixel(int value) Set the bits per pixel for the display.voidsetCenterWindow(boolean center) Enables or disables the Center Window flag.voidsetCustomRenderer(Class<? extends JmeContext> clazz) Set a custom graphics renderer to use.voidsetDepthBits(int value) Sets the number of depth bits to use.voidsetEmulateKeyboard(boolean emulateKeyboard) Enable or disable keyboard emulation on touchscreen based devices.voidsetEmulateMouse(boolean emulateMouse) Enable or disable mouse emulation on touchscreen based devices.voidsetEmulateMouseFlipAxis(boolean flipX, boolean flipY) Specify if the X or Y (or both) axes should be flipped for emulated mouse.voidsetFrameRate(int frameRate) voidsetFrequency(int value) Set the frequency, also known as refresh rate, for the rendering display.voidsetFullscreen(boolean value) voidsetGammaCorrection(boolean gammaCorrection) Enable or disable gamma correction.voidsetGraphicsDebug(boolean debug) Set whether the renderer will be run in Graphics Debug mode, which means every openGL call is checked and if it returns an error code, throw aRendererException.
 Without this, many openGL calls might fail without notice, so turning it on is recommended for development.voidsetGraphicsTiming(boolean timing) Set whether the renderer will be run in Graphics Timing mode, which means every openGL call is checked and if it runs for longer than a millisecond, log it.
 It also keeps track of the time spent in GL Calls in general and displays them whenGL.resetStats()is called.voidsetGraphicsTrace(boolean trace) Set whether the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one can trace what openGL commands where executed in which order by the engine.voidsetHeight(int value) voidSets the application icons to be used, with the most preferred first.voidsetMinHeight(int value) voidsetMinResolution(int width, int height) Set the minimum resolution the settings window will allow for the rendering displayvoidsetMinWidth(int value) voidsetOpenCLPlatformChooser(Class<? extends PlatformChooser> chooser) Sets a custom platform chooser.voidsetOpenCLSupport(boolean support) True to enable the creation of an OpenCL context.voidsetRenderer(String renderer) Set the graphics renderer to use, one of:
 AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate OpenGL version based on system capabilities AppSettings.JOGL_OPENGL_BACKWARD_COMPATIBLE AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE null - Disable graphics renderingvoidsetResizable(boolean resizable) Allows the display window to be resized by dragging its edges.voidsetResolution(int width, int height) Set the resolution for the default framebuffer UsesetWindowSize(int, int)instead, for HiDPI display support.voidsetSamples(int value) Set the number of samples per pixel.voidsetSettingsDialogImage(String path) Sets the path of the settings dialog image to use.voidsetStencilBits(int value) Set the number of stencil bits.voidsetStereo3D(boolean value) Enable 3D stereo.voidsetSwapBuffers(boolean swapBuffers) When enabled the display context will swap buffers every frame.voidvoidsetUseInput(boolean use) voidsetUseJoysticks(boolean use) voidsetUseRetinaFrameBuffer(boolean useRetinaFrameBuffer) Specifies whether to use full resolution framebuffers on Retina displays.voidsetVSync(boolean value) Enable or disable vertical synchronization.voidsetWidth(int value) voidsetWindowSize(int width, int height) Set the size of the windowvoidsetWindowXPosition(int pos) Sets the window's initial X position on the desktop.voidsetWindowYPosition(int pos) Sets the window's initial Y position on the desktop.booleanuseInput()Get the use input state.booleanGet the use joysticks statebooleanGet the stereo 3D stateMethods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMapequals, hashCode, toString
- 
Field Details- 
LWJGL_OPENGL2Use LWJGL as the display system and force using the OpenGL2.0 renderer.If the underlying system does not support OpenGL2.0, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL3Deprecated.Previously meant 3.2, use LWJGL_OPENGL32 or LWJGL_OPENGL30Use LWJGL as the display system and force using the core OpenGL3.2 renderer.If the underlying system does not support OpenGL3.2, then the context initialization will throw an exception. Note that currently jMonkeyEngine does not have any shaders that support OpenGL3.2 therefore this option is not useful. Note: OpenGL 3.2 is used to give 3.x support to Mac users. 
- 
LWJGL_OPENGL30Use LWJGL as the display system and force using the core OpenGL3.0 renderer.If the underlying system does not support OpenGL3.0, then the context initialization will throw an exception. Note that currently jMonkeyEngine does not have any shaders that support OpenGL3.0 therefore this option is not useful. 
- 
LWJGL_OPENGL31Use LWJGL as the display system and force using the core OpenGL3.1 renderer.If the underlying system does not support OpenGL3.1, then the context initialization will throw an exception. Note that currently jMonkeyEngine does not have any shaders that support OpenGL3.0 therefore this option is not useful. 
- 
LWJGL_OPENGL32Use LWJGL as the display system and force using the core OpenGL3.2 renderer.If the underlying system does not support OpenGL3.2, then the context initialization will throw an exception. Note that currently jMonkeyEngine does not have any shaders that support OpenGL3.2 therefore this option is not useful. Note: OpenGL 3.2 is used to give 3.x support to Mac users. 
- 
LWJGL_OPENGL33Use LWJGL as the display system and force using the OpenGL3.3 renderer.If the underlying system does not support OpenGL3.3, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL4Deprecated.Use LWJGL_OPENGL40Use LWJGL as the display system and force using the OpenGL4.0 renderer.If the underlying system does not support OpenGL4.0, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL40Use LWJGL as the display system and force using the OpenGL4.0 renderer.If the underlying system does not support OpenGL4.0, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL41Use LWJGL as the display system and force using the OpenGL4.1 renderer.If the underlying system does not support OpenGL4.1, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL42Use LWJGL as the display system and force using the OpenGL4.2 renderer.If the underlying system does not support OpenGL4.2, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL43Use LWJGL as the display system and force using the OpenGL4.3 renderer.If the underlying system does not support OpenGL4.3, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL44Use LWJGL as the display system and force using the OpenGL4.4 renderer.If the underlying system does not support OpenGL4.4, then the context initialization will throw an exception. 
- 
LWJGL_OPENGL45Use LWJGL as the display system and force using the OpenGL4.5 renderer.If the underlying system does not support OpenGL4.5, then the context initialization will throw an exception. 
- 
LWJGL_OPENALUse the LWJGL OpenAL based renderer for audio capabilities.
- 
ANDROID_MEDIAPLAYERDeprecated.This audio renderer has too many limitations. useANDROID_OPENAL_SOFTinstead.Use the Android MediaPlayer / SoundPool based renderer for Android audio capabilities.NOTE: Supports Android 2.2+ platforms. 
- 
ANDROID_OPENAL_SOFTUse the OpenAL Soft based renderer for Android audio capabilities.This is the current default for Android platforms. NOTE: Only to be used on Android 2.3+ platforms due to using OpenSL. 
- 
JOGL_OPENGL_FORWARD_COMPATIBLEUse JogAmp's JOGL as the display system, with the OpenGL forward compatible profileN.B: This backend is EXPERIMENTAL 
- 
JOGL_OPENGL_BACKWARD_COMPATIBLEUse JogAmp's JOGL as the display system, with the backward compatible profileN.B: This backend is EXPERIMENTAL 
- 
JOALUse JogAmp's JOAL as the audio renderer.N.B: This backend is EXPERIMENTAL 
 
- 
- 
Constructor Details- 
AppSettingspublic AppSettings(boolean loadDefaults) Create a new instance ofAppSettings.If loadDefaultsis true, then the default settings will be set on the AppSettings. Use false if you want to change some settings but you would like the application to load settings from previous launches.- Parameters:
- loadDefaults- If default settings are to be loaded.
 
 
- 
- 
Method Details- 
copyFromCopies all settings fromothertothisAppSettings.Any settings that are specified in other will overwrite settings set on this AppSettings. - Parameters:
- other- The AppSettings to copy the settings from
 
- 
mergeFromSame ascopyFrom(com.jme3.system.AppSettings), except doesn't overwrite settings that are already set.- Parameters:
- other- The AppSettings to merge the settings from
 
- 
loadLoads the settings from the given properties input stream.- Parameters:
- in- The InputStream to load from
- Throws:
- IOException- If an IOException occurs
- See Also:
 
- 
saveSaves all settings to the given properties output stream.- Parameters:
- out- The OutputStream to write to
- Throws:
- IOException- If an IOException occurs
- See Also:
 
- 
loadLoads settings previously saved in the Java preferences.- Parameters:
- preferencesKey- The preferencesKey previously used to save the settings.
- Throws:
- BackingStoreException- If an exception occurs with the preferences
- See Also:
 
- 
saveSaves settings into the Java preferences.On the Windows operating system, the preferences are saved in the registry at the following key: 
 HKEY_CURRENT_USER\Software\JavaSoft\Prefs\[preferencesKey]- Parameters:
- preferencesKey- The preferences key to save at. Generally the application's unique name.
- Throws:
- BackingStoreException- If an exception occurs with the preferences
 
- 
getIntegerGet an integer from the settings.If the key is not set, then 0 is returned. - Parameters:
- key- the key of an integer setting
- Returns:
- the corresponding value, or 0 if not set
 
- 
getBooleanGet a boolean from the settings.If the key is not set, then false is returned. - Parameters:
- key- the key of a boolean setting
- Returns:
- the corresponding value, or false if not set
 
- 
getStringGet a string from the settings.If the key is not set, then null is returned. - Parameters:
- key- the key of a string setting
- Returns:
- the corresponding value, or null if not set
 
- 
getFloatGet a float from the settings.If the key is not set, then 0.0 is returned. - Parameters:
- key- the key of a float setting
- Returns:
- the corresponding value, or 0 if not set
 
- 
putIntegerSet an integer on the settings.- Parameters:
- key- the desired key
- value- the desired integer value
 
- 
putBooleanSet a boolean on the settings.- Parameters:
- key- the desired key
- value- the desired boolean value
 
- 
putStringSet a string on the settings.- Parameters:
- key- the desired key
- value- the desired string value
 
- 
putFloatSet a float on the settings.- Parameters:
- key- the desired key
- value- the desired float value
 
- 
setEmulateMousepublic void setEmulateMouse(boolean emulateMouse) Enable or disable mouse emulation on touchscreen based devices. This will convert taps on the touchscreen or movement of finger over touchscreen (only the first) into the appropriate mouse events.- Parameters:
- emulateMouse- If mouse emulation should be enabled.
 
- 
isEmulateMousepublic boolean isEmulateMouse()Returns true if mouse emulation is enabled, false otherwise.- Returns:
- Mouse emulation mode.
 
- 
setEmulateMouseFlipAxispublic void setEmulateMouseFlipAxis(boolean flipX, boolean flipY) Specify if the X or Y (or both) axes should be flipped for emulated mouse.- Parameters:
- flipX- Set to flip X axis
- flipY- Set to flip Y axis
- See Also:
 
- 
isEmulateMouseFlipXpublic boolean isEmulateMouseFlipX()
- 
isEmulateMouseFlipYpublic boolean isEmulateMouseFlipY()
- 
setEmulateKeyboardpublic void setEmulateKeyboard(boolean emulateKeyboard) Enable or disable keyboard emulation on touchscreen based devices. This will convert soft keyboard key presses on the touchscreen into the appropriate key events.- Parameters:
- emulateKeyboard- If soft keyboard emulation should be enabled.
 
- 
isEmulateKeyboardpublic boolean isEmulateKeyboard()Returns true if keyboard emulation is enabled, false otherwise.- Returns:
- Soft keyboard emulation mode.
 
- 
setFrameRatepublic void setFrameRate(int frameRate) - Parameters:
- frameRate- The frame-rate is the upper limit on how high the application's frames-per-second can go. (Default: -1 no frame rate limit imposed)
 
- 
setUseInputpublic void setUseInput(boolean use) - Parameters:
- use- If true, the application will initialize and use input. Set to false for headless applications that do not require keyboard or mouse input. (Default: true)
 
- 
setUseJoystickspublic void setUseJoysticks(boolean use) - Parameters:
- use- If true, the application will initialize and use joystick input. Set to false if no joystick input is desired. (Default: false)
 
- 
setRendererSet the graphics renderer to use, one of:
 - AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability
- AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability
- AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability
- AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate OpenGL version based on system capabilities
- AppSettings.JOGL_OPENGL_BACKWARD_COMPATIBLE
- AppSettings.JOGL_OPENGL_FORWARD_COMPATIBLE
- null - Disable graphics rendering
 - Parameters:
- renderer- The renderer to set (Default: AppSettings.LWJGL_OPENGL32)
 
- 
setCustomRendererSet a custom graphics renderer to use. The class should implement theJmeContextinterface.- Parameters:
- clazz- The custom context class. (Default: not set)
 
- 
setAudioRendererSet the audio renderer to use. One of:
 - AppSettings.LWJGL_OPENAL - Default for LWJGL
- AppSettings.JOAL
- null - Disable audio
 - Parameters:
- audioRenderer- (Default: LWJGL)
 
- 
setWidthpublic void setWidth(int value) - Parameters:
- value- the width for the default framebuffer. (Default: 640)
 
- 
setHeightpublic void setHeight(int value) - Parameters:
- value- the height for the default framebuffer. (Default: 480)
 
- 
setResolutionpublic void setResolution(int width, int height) Set the resolution for the default framebuffer UsesetWindowSize(int, int)instead, for HiDPI display support.- Parameters:
- width- The width
- height- The height (Default: 640x480)
 
- 
setWindowSizepublic void setWindowSize(int width, int height) Set the size of the window- Parameters:
- width- The width in pixels (default = width of the default framebuffer)
- height- The height in pixels (default = height of the default framebuffer)
 
- 
setMinWidthpublic void setMinWidth(int value) - Parameters:
- value- the minimum width the settings window will allow for the rendering display. (Default: 0)
 
- 
setMinHeightpublic void setMinHeight(int value) - Parameters:
- value- the minimum height the settings window will allow for the rendering display. (Default: 0)
 
- 
setMinResolutionpublic void setMinResolution(int width, int height) Set the minimum resolution the settings window will allow for the rendering display- Parameters:
- width- The minimum width
- height- The minimum height (Default: 0x0)
 
- 
setFrequencypublic void setFrequency(int value) Set the frequency, also known as refresh rate, for the rendering display.- Parameters:
- value- The frequency (Default: 60)
 
- 
setDepthBitspublic void setDepthBits(int value) Sets the number of depth bits to use.The number of depth bits specifies the precision of the depth buffer. To increase precision, specify 32 bits. To decrease precision, specify 16 bits. On some platforms 24 bits might not be supported, in that case, specify 16 bits. (Default: 24) - Parameters:
- value- The depth bits
 
- 
setAlphaBitspublic void setAlphaBits(int value) Android Only Sets the number of alpha bits to use.The number of alpha bits specifies the precision of the surface view background alpha value. To set the surface view to opaque (fastest setting), leave the number of alpha bits = 0. This will cause faster rendering, but android views located behind the surface view will not be viewable. To set the surface view to translucent, set the number of alphaBits to 8 or higher. Values less than 8 (except 0) will set the surface view pixel format to transparent. (Default: 0) - Parameters:
- value- The alpha bits
 
- 
setStencilBitspublic void setStencilBits(int value) Set the number of stencil bits.This value is only relevant when the stencil buffer is being used. Specify 8 to indicate an 8-bit stencil buffer, specify 0 to disable the stencil buffer. (Default: 0)- Parameters:
- value- Number of stencil bits
 
- 
setBitsPerPixelpublic void setBitsPerPixel(int value) Set the bits per pixel for the display. Appropriate values are 16 for RGB565 color format, or 24 for RGB8 color format.- Parameters:
- value- The bits per pixel to set (Default: 24)
 
- 
setSamplespublic void setSamples(int value) Set the number of samples per pixel. A value of 0 or 1 indicates each pixel should be single-sampled, higher values indicate a pixel should be multi-sampled.- Parameters:
- value- The number of samples (Default: 0)
 
- 
setTitle- Parameters:
- title- The title of the rendering display (Default: jMonkeyEngine 3.0)
 
- 
setFullscreenpublic void setFullscreen(boolean value) - Parameters:
- value- true to enable full-screen rendering, false to render in a window (Default: false)
 
- 
setVSyncpublic void setVSync(boolean value) Enable or disable vertical synchronization. If enabled, rendering will be synchronized with the display's refresh interval.- Parameters:
- value- true to enable, false to disable (Default : true)
 
- 
setStereo3Dpublic void setStereo3D(boolean value) Enable 3D stereo.This feature requires hardware support from the GPU driver. See http://en.wikipedia.org/wiki/Quad_buffering 
 Once enabled, filters or scene processors that handle 3D stereo rendering could use this feature to render using hardware 3D stereo.- Parameters:
- value- true to enable 3-D stereo, false to disable (default=false)
 
- 
setIconsSets the application icons to be used, with the most preferred first. For Windows, you should supply at least one 16x16 icon and one 32x32. The former is used for the title/task bar, the latter for the alt-tab icon. Linux (and similar platforms) expect one 32x32 icon. Mac OS X should be supplied one 128x128 icon.
 The icon is used for the settings window, and the LWJGL render window. Note that a bug in Java 6 (bug ID 6445278, currently hidden but available in Google cache) currently prevents the icon working for alt-tab on the settings dialog in Windows.- Parameters:
- value- An array of BufferedImages to use as icons. (Default: not set)
 
- 
setSettingsDialogImageSets the path of the settings dialog image to use.The image will be displayed in the settings dialog when the application is started. (Default: /com/jme3/app/Monkey.png)- Parameters:
- path- The path to the image in the classpath.
 
- 
setGammaCorrectionpublic void setGammaCorrection(boolean gammaCorrection) Enable or disable gamma correction. If enabled, the main framebuffer will be configured for sRGB colors, and sRGB images will be linearized. Gamma correction requires a GPU that supports GL_ARB_framebuffer_sRGB; otherwise this setting will be ignored.- Parameters:
- gammaCorrection- true to enable, false to disable (Default : true)
 
- 
getFrameRatepublic int getFrameRate()Get the framerate.- Returns:
- the maximum rate (in frames per second), or -1 for unlimited
- See Also:
 
- 
useInputpublic boolean useInput()Get the use input state.- Returns:
- true if input is enabled, false if it's disabled
- See Also:
 
- 
getRendererGet the renderer- Returns:
- the graphics renderer's name and version, for example "LWJGL-OpenGL33"
- See Also:
 
- 
getWidthpublic int getWidth()Get the width- Returns:
- the width of the default framebuffer (in pixels)
- See Also:
 
- 
getHeightpublic int getHeight()Get the height- Returns:
- the height of the default framebuffer (in pixels)
- See Also:
 
- 
getWindowWidthpublic int getWindowWidth()Get the width of the window- Returns:
- the width of the window (in pixels)
- See Also:
 
- 
getWindowHeightpublic int getWindowHeight()Get the height of the window- Returns:
- the height of the window (in pixels)
- See Also:
 
- 
getMinWidthpublic int getMinWidth()Get the width- Returns:
- the minimum width for the rendering display (in pixels)
- See Also:
 
- 
getMinHeightpublic int getMinHeight()Get the height- Returns:
- the minimum height for the rendering display (in pixels)
- See Also:
 
- 
getBitsPerPixelpublic int getBitsPerPixel()Get the bits per pixel- Returns:
- the number of color bits per rendered pixel
- See Also:
 
- 
getFrequencypublic int getFrequency()Get the frequency- Returns:
- the refresh rate of the (full-screen) display (in Hertz)
- See Also:
 
- 
getDepthBitspublic int getDepthBits()Get the number of depth bits- Returns:
- the number of depth bits per rendered pixel
- See Also:
 
- 
getAlphaBitspublic int getAlphaBits()Android Only Get the number of alpha bits for the surface view to use.- Returns:
- the number of alpha bits per rendered pixel
- See Also:
 
- 
getStencilBitspublic int getStencilBits()Get the number of stencil bits- Returns:
- the number of stencil bits per rendered pixel
- See Also:
 
- 
getSamplespublic int getSamples()Get the number of samples- Returns:
- the number of samples per pixel (for multisample anti-aliasing)
- See Also:
 
- 
getTitleGet the application title- Returns:
- the title text
- See Also:
 
- 
isVSyncpublic boolean isVSync()Test whether vertical synchronization should be enabled.- Returns:
- true for enabled, false for disabled
- See Also:
 
- 
isFullscreenpublic boolean isFullscreen()Get the fullscreen state- Returns:
- true for fullscreen display, false for windowed display
- See Also:
 
- 
useJoystickspublic boolean useJoysticks()Get the use joysticks state- Returns:
- true to enable joystick input, false to disable it
- See Also:
 
- 
getAudioRendererGet the audio renderer- Returns:
- the audio renderer's name, for example "LWJGL"
- See Also:
 
- 
useStereo3Dpublic boolean useStereo3D()Get the stereo 3D state- Returns:
- true if 3-D stereo is enabled, otherwise false
- See Also:
 
- 
getIconsGet the icon array- Returns:
- the pre-existing array
- See Also:
 
- 
getSettingsDialogImageGet the settings dialog image- Returns:
- a path to the image asset
- See Also:
 
- 
isGammaCorrectionpublic boolean isGammaCorrection()Test whether gamma correction should be enabled.- Returns:
- true for enabled, false for disabled
 
- 
setResizablepublic void setResizable(boolean resizable) Allows the display window to be resized by dragging its edges. Only supported forJmeContext.Type.Displaycontexts which are in windowed mode, ignored for other types. The default value isfalse.- Parameters:
- resizable- True to make a resizable window, false to make a fixed size window.
 
- 
isResizablepublic boolean isResizable()Determine if the display window can be resized by dragging its edges.- Returns:
- True if the window is resizable, false if it is fixed size.
- See Also:
 
- 
setSwapBufferspublic void setSwapBuffers(boolean swapBuffers) When enabled the display context will swap buffers every frame. This may need to be disabled when integrating with an external library that handles buffer swapping on its own, e.g. Oculus Rift. When disabled, the engine will process window messages after each frame, but it will not swap buffers. Note that this will cause 100% CPU usage normally as there's no VSync or any framerate caps (unless set viasetFrameRate(int)). The default istrue.- Parameters:
- swapBuffers- True to enable buffer swapping, false to disable it.
 
- 
isSwapBufferspublic boolean isSwapBuffers()Determine if the display context will swap buffers every frame.- Returns:
- True if buffer swapping is enabled, false otherwise.
- See Also:
 
- 
setOpenCLSupportpublic void setOpenCLSupport(boolean support) True to enable the creation of an OpenCL context.- Parameters:
- support- whether to create the context or not
 
- 
isOpenCLSupportpublic boolean isOpenCLSupport()
- 
setOpenCLPlatformChooserSets a custom platform chooser. This chooser specifies which platform and which devices are used for the OpenCL context. Default: an implementation defined one.- Parameters:
- chooser- the class of the chooser, must have a default constructor
 
- 
getOpenCLPlatformChooser
- 
isGraphicsDebugpublic boolean isGraphicsDebug()Determine if the renderer will be run in Graphics Debug mode, which means every openGL call is checked and if it returns an error code, throw aRendererException.
 Without this, many openGL calls might fail without notice, so turning it on is recommended for development. Graphics Debug mode will also label native objects and group calls on supported renderers. Compatible graphics debuggers will be able to use this data to show a better outlook of your application- Returns:
- whether the context will be run in Graphics Debug Mode or not
- See Also:
 
- 
setGraphicsDebugpublic void setGraphicsDebug(boolean debug) Set whether the renderer will be run in Graphics Debug mode, which means every openGL call is checked and if it returns an error code, throw aRendererException.
 Without this, many openGL calls might fail without notice, so turning it on is recommended for development. Graphics Debug mode will also label native objects and group calls on supported renderers. Compatible graphics debuggers will be able to use this data to show a better outlook of your application- Parameters:
- debug- whether the context will be run in Graphics Debug Mode or not
- See Also:
 
- 
isGraphicsTimingpublic boolean isGraphicsTiming()Determine if the renderer will be run in Graphics Timing mode, which means every openGL call is checked and if it runs for longer than a millisecond, log it.
 It also keeps track of the time spent in GL Calls in general and displays them whenGL.resetStats()is called.- Returns:
- whether the context will be run in Graphics Timing Mode or not
- See Also:
 
- 
setGraphicsTimingpublic void setGraphicsTiming(boolean timing) Set whether the renderer will be run in Graphics Timing mode, which means every openGL call is checked and if it runs for longer than a millisecond, log it.
 It also keeps track of the time spent in GL Calls in general and displays them whenGL.resetStats()is called.- Parameters:
- timing- whether the context will be run in Graphics Timing Mode or not
- See Also:
 
- 
isGraphicsTracepublic boolean isGraphicsTrace()Determine if the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one can trace what openGL commands where executed in which order by the engine.- Returns:
- whether the context will be run in Graphics Trace Mode or not
- See Also:
 
- 
setGraphicsTracepublic void setGraphicsTrace(boolean trace) Set whether the renderer will be run in Graphics Trace mode, which means every openGL call is logged so one can trace what openGL commands where executed in which order by the engine.- Parameters:
- trace- whether the context will be run in Graphics Trace Mode or not
- See Also:
 
- 
isUseRetinaFrameBufferpublic boolean isUseRetinaFrameBuffer()Determine whether to use full resolution framebuffers on Retina displays.- Returns:
- whether to use full resolution framebuffers on Retina displays.
 
- 
setUseRetinaFrameBufferpublic void setUseRetinaFrameBuffer(boolean useRetinaFrameBuffer) Specifies whether to use full resolution framebuffers on Retina displays. This is ignored on other platforms.- Parameters:
- useRetinaFrameBuffer- whether to use full resolution framebuffers on Retina displays.
 
- 
getCenterWindowpublic boolean getCenterWindow()Tests the state of the Center Window flag.The Center Window flag is used only with LWJGL3 and has no effect on fullscreen windows. - Returns:
- true to center the window on the desktop, false to position the window at (WindowXPosition, WindowYPosition)
- See Also:
 
- 
setCenterWindowpublic void setCenterWindow(boolean center) Enables or disables the Center Window flag.The Center Window flag is used only with LWJGL3 and has no effect on fullscreen windows. It defaults to true. - Parameters:
- center- true to center the window on the desktop, false to position the window at (WindowXPosition, WindowYPosition)
 
- 
getWindowXPositionpublic int getWindowXPosition()Gets the window's initial X position on the desktop.This setting is used only with LWJGL3, has no effect on fullscreen windows, and is ignored if the Center Window flag is true. - Returns:
- the initial position of the window's left edge relative to the left edge of the desktop
- See Also:
 
- 
setWindowXPositionpublic void setWindowXPosition(int pos) Sets the window's initial X position on the desktop.This setting is used only with LWJGL3, has no effect on fullscreen windows, and is ignored if the Center Window flag is true. Its default value is 0. - Parameters:
- pos- the desired initial position of the window's left edge relative to the left edge of the desktop
- See Also:
 
- 
getWindowYPositionpublic int getWindowYPosition()Gets the window's initial Y position on the desktop.This setting is used only with LWJGL3, has no effect on fullscreen windows, and is ignored if the Center Window flag is true. - Returns:
- the initial position of the window's upper edge relative to the upper edge of the desktop
- See Also:
 
- 
setWindowYPositionpublic void setWindowYPosition(int pos) Sets the window's initial Y position on the desktop.This setting is used only with LWJGL3, has no effect on fullscreen windows, and is ignored if the Center Window flag is true. Its default value is 0. - Parameters:
- pos- the desired initial position of the window's upper edge relative to the upper edge of the desktop
- See Also:
 
 
-