Class AppSettings

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public final class AppSettings extends HashMap<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:
  • Field Details

    • LWJGL_OPENGL2

      public static final String LWJGL_OPENGL2
      Use 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.

      See Also:
    • LWJGL_OPENGL3

      @Deprecated public static final String LWJGL_OPENGL3
      Deprecated.
      Previously meant 3.2, use LWJGL_OPENGL32 or LWJGL_OPENGL30
      Use 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.

      See Also:
    • LWJGL_OPENGL30

      public static final String LWJGL_OPENGL30
      Use 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.

      See Also:
    • LWJGL_OPENGL31

      public static final String LWJGL_OPENGL31
      Use 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.

      See Also:
    • LWJGL_OPENGL32

      public static final String LWJGL_OPENGL32
      Use 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.

      See Also:
    • LWJGL_OPENGL33

      public static final String LWJGL_OPENGL33
      Use 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.

      See Also:
    • LWJGL_OPENGL4

      @Deprecated public static final String LWJGL_OPENGL4
      Deprecated.
      Use LWJGL_OPENGL40
      Use 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.

      See Also:
    • LWJGL_OPENGL40

      public static final String LWJGL_OPENGL40
      Use 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.

      See Also:
    • LWJGL_OPENGL41

      public static final String LWJGL_OPENGL41
      Use 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.

      See Also:
    • LWJGL_OPENGL42

      public static final String LWJGL_OPENGL42
      Use 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.

      See Also:
    • LWJGL_OPENGL43

      public static final String LWJGL_OPENGL43
      Use 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.

      See Also:
    • LWJGL_OPENGL44

      public static final String LWJGL_OPENGL44
      Use 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.

      See Also:
    • LWJGL_OPENGL45

      public static final String LWJGL_OPENGL45
      Use 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.

      See Also:
    • LWJGL_OPENAL

      public static final String LWJGL_OPENAL
      Use the LWJGL OpenAL based renderer for audio capabilities.
      See Also:
    • ANDROID_MEDIAPLAYER

      @Deprecated public static final String ANDROID_MEDIAPLAYER
      Deprecated.
      This audio renderer has too many limitations. use ANDROID_OPENAL_SOFT instead.
      Use the Android MediaPlayer / SoundPool based renderer for Android audio capabilities.

      NOTE: Supports Android 2.2+ platforms.

      See Also:
    • ANDROID_OPENAL_SOFT

      public static final String ANDROID_OPENAL_SOFT
      Use 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.

      See Also:
    • JOGL_OPENGL_FORWARD_COMPATIBLE

      public static final String JOGL_OPENGL_FORWARD_COMPATIBLE
      Use JogAmp's JOGL as the display system, with the OpenGL forward compatible profile

      N.B: This backend is EXPERIMENTAL

      See Also:
    • JOGL_OPENGL_BACKWARD_COMPATIBLE

      public static final String JOGL_OPENGL_BACKWARD_COMPATIBLE
      Use JogAmp's JOGL as the display system, with the backward compatible profile

      N.B: This backend is EXPERIMENTAL

      See Also:
    • JOAL

      public static final String JOAL
      Use JogAmp's JOAL as the audio renderer.

      N.B: This backend is EXPERIMENTAL

      See Also:
  • Constructor Details

    • AppSettings

      public AppSettings(boolean loadDefaults)
      Create a new instance of AppSettings.

      If loadDefaults is 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

    • copyFrom

      public void copyFrom(AppSettings other)
      Copies all settings from other to this AppSettings.

      Any settings that are specified in other will overwrite settings set on this AppSettings.

      Parameters:
      other - The AppSettings to copy the settings from
    • mergeFrom

      public void mergeFrom(AppSettings other)
      Same as copyFrom(com.jme3.system.AppSettings), except doesn't overwrite settings that are already set.
      Parameters:
      other - The AppSettings to merge the settings from
    • load

      public void load(InputStream in) throws IOException
      Loads the settings from the given properties input stream.
      Parameters:
      in - The InputStream to load from
      Throws:
      IOException - If an IOException occurs
      See Also:
    • save

      public void save(OutputStream out) throws IOException
      Saves all settings to the given properties output stream.
      Parameters:
      out - The OutputStream to write to
      Throws:
      IOException - If an IOException occurs
      See Also:
    • load

      public void load(String preferencesKey) throws BackingStoreException
      Loads 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:
    • save

      public void save(String preferencesKey) throws BackingStoreException
      Saves 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
    • getInteger

      public int getInteger(String key)
      Get 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
    • getBoolean

      public boolean getBoolean(String key)
      Get 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
    • getString

      public String getString(String key)
      Get 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
    • getFloat

      public float getFloat(String key)
      Get 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
    • putInteger

      public void putInteger(String key, int value)
      Set an integer on the settings.
      Parameters:
      key - the desired key
      value - the desired integer value
    • putBoolean

      public void putBoolean(String key, boolean value)
      Set a boolean on the settings.
      Parameters:
      key - the desired key
      value - the desired boolean value
    • putString

      public void putString(String key, String value)
      Set a string on the settings.
      Parameters:
      key - the desired key
      value - the desired string value
    • putFloat

      public void putFloat(String key, float value)
      Set a float on the settings.
      Parameters:
      key - the desired key
      value - the desired float value
    • setEmulateMouse

      public 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.
    • isEmulateMouse

      public boolean isEmulateMouse()
      Returns true if mouse emulation is enabled, false otherwise.
      Returns:
      Mouse emulation mode.
    • setEmulateMouseFlipAxis

      public 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:
    • isEmulateMouseFlipX

      public boolean isEmulateMouseFlipX()
    • isEmulateMouseFlipY

      public boolean isEmulateMouseFlipY()
    • setEmulateKeyboard

      public 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.
    • isEmulateKeyboard

      public boolean isEmulateKeyboard()
      Returns true if keyboard emulation is enabled, false otherwise.
      Returns:
      Soft keyboard emulation mode.
    • setFrameRate

      public 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)
    • setUseInput

      public 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)
    • setUseJoysticks

      public 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)
    • setRenderer

      public void setRenderer(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 rendering
      Parameters:
      renderer - The renderer to set (Default: AppSettings.LWJGL_OPENGL32)
    • setCustomRenderer

      public void setCustomRenderer(Class<? extends JmeContext> clazz)
      Set a custom graphics renderer to use. The class should implement the JmeContext interface.
      Parameters:
      clazz - The custom context class. (Default: not set)
    • setAudioRenderer

      public void setAudioRenderer(String audioRenderer)
      Set the audio renderer to use. One of:
      • AppSettings.LWJGL_OPENAL - Default for LWJGL
      • AppSettings.JOAL
      • null - Disable audio
      Parameters:
      audioRenderer - (Default: LWJGL)
    • setWidth

      public void setWidth(int value)
      Parameters:
      value - the width for the default framebuffer. (Default: 640)
    • setHeight

      public void setHeight(int value)
      Parameters:
      value - the height for the default framebuffer. (Default: 480)
    • setResolution

      public void setResolution(int width, int height)
      Set the resolution for the default framebuffer Use setWindowSize(int, int) instead, for HiDPI display support.
      Parameters:
      width - The width
      height - The height (Default: 640x480)
    • setWindowSize

      public 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)
    • setMinWidth

      public void setMinWidth(int value)
      Parameters:
      value - the minimum width the settings window will allow for the rendering display. (Default: 0)
    • setMinHeight

      public void setMinHeight(int value)
      Parameters:
      value - the minimum height the settings window will allow for the rendering display. (Default: 0)
    • setMinResolution

      public 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)
    • setFrequency

      public void setFrequency(int value)
      Set the frequency, also known as refresh rate, for the rendering display.
      Parameters:
      value - The frequency (Default: 60)
    • setDepthBits

      public 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
    • setAlphaBits

      public 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
    • setStencilBits

      public 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
    • setBitsPerPixel

      public 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)
    • setSamples

      public void setSamples(int value)
      Set the number of samples per pixel. A value of 1 indicates each pixel should be single-sampled, higher values indicate a pixel should be multi-sampled.
      Parameters:
      value - The number of samples (Default: 1)
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - The title of the rendering display (Default: jMonkeyEngine 3.0)
    • setFullscreen

      public void setFullscreen(boolean value)
      Parameters:
      value - true to enable full-screen rendering, false to render in a window (Default: false)
    • setVSync

      public 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)
    • setStereo3D

      public 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)
    • setIcons

      public void setIcons(Object[] value)
      Sets 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)
    • setSettingsDialogImage

      public void setSettingsDialogImage(String path)
      Sets 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.
    • setGammaCorrection

      public 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)
    • getFrameRate

      public int getFrameRate()
      Get the framerate.
      Returns:
      the maximum rate (in frames per second), or -1 for unlimited
      See Also:
    • useInput

      public boolean useInput()
      Get the use input state.
      Returns:
      true if input is enabled, false if it's disabled
      See Also:
    • getRenderer

      public String getRenderer()
      Get the renderer
      Returns:
      the graphics renderer's name and version, for example "LWJGL-OpenGL33"
      See Also:
    • getWidth

      public int getWidth()
      Get the width
      Returns:
      the width of the default framebuffer (in pixels)
      See Also:
    • getHeight

      public int getHeight()
      Get the height
      Returns:
      the height of the default framebuffer (in pixels)
      See Also:
    • getWindowWidth

      public int getWindowWidth()
      Get the width of the window
      Returns:
      the width of the window (in pixels)
      See Also:
    • getWindowHeight

      public int getWindowHeight()
      Get the height of the window
      Returns:
      the height of the window (in pixels)
      See Also:
    • getMinWidth

      public int getMinWidth()
      Get the width
      Returns:
      the minimum width for the rendering display (in pixels)
      See Also:
    • getMinHeight

      public int getMinHeight()
      Get the height
      Returns:
      the minimum height for the rendering display (in pixels)
      See Also:
    • getBitsPerPixel

      public int getBitsPerPixel()
      Get the bits per pixel
      Returns:
      the number of color bits per rendered pixel
      See Also:
    • getFrequency

      public int getFrequency()
      Get the frequency
      Returns:
      the refresh rate of the (full-screen) display (in Hertz)
      See Also:
    • getDepthBits

      public int getDepthBits()
      Get the number of depth bits
      Returns:
      the number of depth bits per rendered pixel
      See Also:
    • getAlphaBits

      public 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:
    • getStencilBits

      public int getStencilBits()
      Get the number of stencil bits
      Returns:
      the number of stencil bits per rendered pixel
      See Also:
    • getSamples

      public int getSamples()
      Get the number of samples
      Returns:
      the number of samples per pixel (for multisample anti-aliasing)
      See Also:
    • getTitle

      public String getTitle()
      Get the application title
      Returns:
      the title text
      See Also:
    • isVSync

      public boolean isVSync()
      Test whether vertical synchronization should be enabled.
      Returns:
      true for enabled, false for disabled
      See Also:
    • isFullscreen

      public boolean isFullscreen()
      Get the fullscreen state
      Returns:
      true for fullscreen display, false for windowed display
      See Also:
    • useJoysticks

      public boolean useJoysticks()
      Get the use joysticks state
      Returns:
      true to enable joystick input, false to disable it
      See Also:
    • getAudioRenderer

      public String getAudioRenderer()
      Get the audio renderer
      Returns:
      the audio renderer's name, for example "LWJGL"
      See Also:
    • useStereo3D

      public boolean useStereo3D()
      Get the stereo 3D state
      Returns:
      true if 3-D stereo is enabled, otherwise false
      See Also:
    • getIcons

      public Object[] getIcons()
      Get the icon array
      Returns:
      the pre-existing array
      See Also:
    • getSettingsDialogImage

      public String getSettingsDialogImage()
      Get the settings dialog image
      Returns:
      a path to the image asset
      See Also:
    • isGammaCorrection

      public boolean isGammaCorrection()
      Test whether gamma correction should be enabled.
      Returns:
      true for enabled, false for disabled
    • setResizable

      public void setResizable(boolean resizable)
      Allows the display window to be resized by dragging its edges. Only supported for JmeContext.Type.Display contexts which are in windowed mode, ignored for other types. The default value is false.
      Parameters:
      resizable - True to make a resizable window, false to make a fixed size window.
    • isResizable

      public 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:
    • setSwapBuffers

      public 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 via setFrameRate(int)). The default is true.
      Parameters:
      swapBuffers - True to enable buffer swapping, false to disable it.
    • isSwapBuffers

      public boolean isSwapBuffers()
      Determine if the display context will swap buffers every frame.
      Returns:
      True if buffer swapping is enabled, false otherwise.
      See Also:
    • setOpenCLSupport

      public void setOpenCLSupport(boolean support)
      True to enable the creation of an OpenCL context.
      Parameters:
      support - whether to create the context or not
    • isOpenCLSupport

      public boolean isOpenCLSupport()
    • setOpenCLPlatformChooser

      public void setOpenCLPlatformChooser(Class<? extends PlatformChooser> chooser)
      Sets 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

      public String getOpenCLPlatformChooser()
    • isGraphicsDebug

      public 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 a RendererException.
      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:
    • setGraphicsDebug

      public 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 a RendererException.
      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:
    • isGraphicsTiming

      public 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 when GL.resetStats() is called.
      Returns:
      whether the context will be run in Graphics Timing Mode or not
      See Also:
    • setGraphicsTiming

      public 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 when GL.resetStats() is called.
      Parameters:
      timing - whether the context will be run in Graphics Timing Mode or not
      See Also:
    • isGraphicsTrace

      public 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:
    • setGraphicsTrace

      public 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:
    • isUseRetinaFrameBuffer

      public boolean isUseRetinaFrameBuffer()
      Determine whether to use full resolution framebuffers on Retina displays.
      Returns:
      whether to use full resolution framebuffers on Retina displays.
    • setUseRetinaFrameBuffer

      public 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.
    • getCenterWindow

      public 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:
    • setCenterWindow

      public 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)
    • getWindowXPosition

      public 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:
    • setWindowXPosition

      public 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:
    • getWindowYPosition

      public 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:
    • setWindowYPosition

      public 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: