Class Lwjgl3ApplicationConfiguration

    • Field Detail

      • errorStream

        public static java.io.PrintStream errorStream
    • Constructor Detail

      • Lwjgl3ApplicationConfiguration

        public Lwjgl3ApplicationConfiguration()
    • Method Detail

      • setInitialVisible

        public void setInitialVisible​(boolean visibility)
        Overrides:
        setInitialVisible in class Lwjgl3WindowConfiguration
        Parameters:
        visibility - whether the window will be visible on creation. (default true)
      • disableAudio

        public void disableAudio​(boolean disableAudio)
        Whether to disable audio or not. If set to true, the returned audio class instances like Audio or Music will be mock implementations.
      • setMaxNetThreads

        public void setMaxNetThreads​(int maxNetThreads)
        Sets the maximum number of threads to use for network requests.
      • setAudioConfig

        public void setAudioConfig​(int simultaneousSources,
                                   int bufferSize,
                                   int bufferCount)
        Sets the audio device configuration.
        Parameters:
        simultaneousSources - the maximum number of sources that can be played simultaniously (default 16)
        bufferSize - the audio device buffer size in samples (default 512)
        bufferCount - the audio device buffer count (default 9)
      • setOpenGLEmulation

        public void setOpenGLEmulation​(Lwjgl3ApplicationConfiguration.GLEmulation glVersion,
                                       int gles3MajorVersion,
                                       int gles3MinorVersion)
        Sets which OpenGL version to use to emulate OpenGL ES. If the given major/minor version is not supported, the backend falls back to OpenGL ES 2.0 emulation through OpenGL 2.0. The default parameters for major and minor should be 3 and 2 respectively to be compatible with Mac OS X. Specifying major version 4 and minor version 2 will ensure that all OpenGL ES 3.0 features are supported. Note however that Mac OS X does only support 3.2.
        Parameters:
        glVersion - which OpenGL ES emulation version to use
        gles3MajorVersion - OpenGL ES major version, use 3 as default
        gles3MinorVersion - OpenGL ES minor version, use 2 as default
        See Also:
        LWJGL OSX ContextAttribs note
      • setBackBufferConfig

        public void setBackBufferConfig​(int r,
                                        int g,
                                        int b,
                                        int a,
                                        int depth,
                                        int stencil,
                                        int samples)
        Sets the bit depth of the color, depth and stencil buffer as well as multi-sampling.
        Parameters:
        r - red bits (default 8)
        g - green bits (default 8)
        b - blue bits (default 8)
        a - alpha bits (default 8)
        depth - depth bits (default 16)
        stencil - stencil bits (default 0)
        samples - MSAA samples (default 0)
      • setTransparentFramebuffer

        public void setTransparentFramebuffer​(boolean transparentFramebuffer)
        Set transparent window hint. Results may vary on different OS and GPUs. Usage with the ANGLE backend is less consistent.
        Parameters:
        transparentFramebuffer -
      • setIdleFPS

        public void setIdleFPS​(int fps)
        Sets the polling rate during idle time in non-continuous rendering mode. Must be positive. Default is 60.
      • setForegroundFPS

        public void setForegroundFPS​(int fps)
        Sets the target framerate for the application. The CPU sleeps as needed. Must be positive. Use 0 to never sleep. Default is 0.
      • setPreferencesConfig

        public void setPreferencesConfig​(java.lang.String preferencesDirectory,
                                         com.badlogic.gdx.Files.FileType preferencesFileType)
        Sets the directory where Preferences will be stored, as well as the file type to be used to store them. Defaults to "$USER_HOME/.prefs/" and Files.FileType.External.
      • setHdpiMode

        public void setHdpiMode​(com.badlogic.gdx.graphics.glutils.HdpiMode mode)
        Defines how HDPI monitors are handled. Operating systems may have a per-monitor HDPI scale setting. The operating system may report window width/height and mouse coordinates in a logical coordinate system at a lower resolution than the actual physical resolution. This setting allows you to specify whether you want to work in logical or raw pixel units. See HdpiMode for more information. Note that some OpenGL functions like GL20.glViewport(int, int, int, int) and GL20.glScissor(int, int, int, int) require raw pixel units. Use HdpiUtils to help with the conversion if HdpiMode is set to HdpiMode.Logical. Defaults to HdpiMode.Logical.
      • enableGLDebugOutput

        public void enableGLDebugOutput​(boolean enable,
                                        java.io.PrintStream debugOutputStream)
        Enables use of OpenGL debug message callbacks. If not supported by the core GL driver (since GL 4.3), this uses the KHR_debug, ARB_debug_output or AMD_debug_output extension if available. By default, debug messages with NOTIFICATION severity are disabled to avoid log spam. You can call with System.err to output to the "standard" error output stream. Use Lwjgl3Application.setGLDebugMessageControl(Lwjgl3Application.GLDebugMessageSeverity, boolean) to enable or disable other severity debug levels.
      • getDisplayMode

        public static com.badlogic.gdx.Graphics.DisplayMode getDisplayMode()
        Returns:
        the currently active Graphics.DisplayMode of the primary monitor
      • getDisplayMode

        public static com.badlogic.gdx.Graphics.DisplayMode getDisplayMode​(com.badlogic.gdx.Graphics.Monitor monitor)
        Returns:
        the currently active Graphics.DisplayMode of the given monitor
      • getDisplayModes

        public static com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes()
        Returns:
        the available Graphics.DisplayModes of the primary monitor
      • getDisplayModes

        public static com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes​(com.badlogic.gdx.Graphics.Monitor monitor)
        Returns:
        the available Graphics.DisplayModes of the given Graphics.Monitor
      • getPrimaryMonitor

        public static com.badlogic.gdx.Graphics.Monitor getPrimaryMonitor()
        Returns:
        the primary Graphics.Monitor
      • getMonitors

        public static com.badlogic.gdx.Graphics.Monitor[] getMonitors()
        Returns:
        the connected Graphics.Monitors