APIdia Launch Partner
Top Inners Fields Constructors Methods
com.badlogic.gdx.backends.lwjgl

public Class LwjglApplicationConfiguration

extends Object
Class Inheritance
Imports
java.util.ArrayList, com.badlogic.gdx.Application, .Files, .Files.FileType, .Graphics, .Graphics.DisplayMode, .LifecycleListener, com.badlogic.gdx.graphics.Color, com.badlogic.gdx.utils.Array, java.awt.GraphicsDevice, .GraphicsEnvironment

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
public int
a

number of bits per color channel

public boolean
allowSoftwareMode

Allows software OpenGL rendering if hardware acceleration was not available.

public int
audioDeviceBufferCount

the audio device buffer count

public int
audioDeviceBufferSize

the audio device buffer size in samples

public int
audioDeviceSimultaneousSources

the maximum number of sources that can be played simultaneously

public int
b

number of bits per color channel

public int
backgroundFPS

Target framerate when the window is not in the foreground.

public int
depth

number of bits for depth and stencil buffer

public static boolean
disableAudio

If true, OpenAL will not be used.

public boolean
forceExit

whether to call System.exit() on tear-down.

public int
foregroundFPS

Target framerate when the window is in the foreground.

public boolean
fullscreen

fullscreen

public int
g

number of bits per color channel

public int
gles30ContextMajorVersion

The OpenGL context major version (the part in front of the decimal point) used to emulate OpenGL ES 3.0, when the version is not supported it will fall back to OpenGL ES 2.0 emulation.

public int
gles30ContextMinorVersion

The OpenGL context major version (the part after the decimal point) used to emulate OpenGL ES 3.0, when the version is not supported it will fall back to OpenGL ES 2.0 emulation.

public int
height

width & height of application window

pack-priv Array<Files.FileType>
pack-priv Array<String>
public Color
public int
maxNetThreads

The maximum number of threads to use for network requests.

public int
overrideDensity

used to emulate screen densities

public boolean
pauseWhenBackground

LifecycleListener#pause() (but continue rendering) when the window is not minimized and not the foreground window.

public boolean
pauseWhenMinimized

LifecycleListener#pause() and don't render when the window is minimized.

public String
preferencesDirectory

Preferences directory on the desktop.

public Files.FileType
preferencesFileType

Preferences file type on the desktop.

public int
r

number of bits per color channel

public boolean
resizable

whether the window is resizable

public int
samples

number of samples for MSAA

public LwjglGraphics.SetDisplayModeCallback
setDisplayModeCallback

Callback used when trying to create a display, can handle failures, default value is null (disabled)

public int
stencil

number of bits for depth and stencil buffer

public String
title

title of application

public boolean
undecorated

whether the window is undecorated

public boolean
useGL30

whether to attempt use OpenGL ES 3.0.

public boolean
useHDPI

enable HDPI mode on Mac OS X

public boolean
vSyncEnabled

whether to enable vsync, can be changed at runtime via Graphics#setVSync(boolean)

public int
width

width & height of application window

public int
x

x & y of application window, -1 for center

public int
y

x & y of application window, -1 for center

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addIcon(String path, Files.FileType fileType)

Adds a window icon.

public static Graphics.DisplayMode
public static Graphics.DisplayMode[]
public void
setFromDisplayMode(Graphics.DisplayMode mode)

Sets the r, g, b and a bits per channel based on the given DisplayMode and sets the fullscreen flag to true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aback to summary
public int a

number of bits per color channel

allowSoftwareModeback to summary
public boolean allowSoftwareMode

Allows software OpenGL rendering if hardware acceleration was not available.

See Also
LwjglGraphics#isSoftwareMode()
audioDeviceBufferCountback to summary
public int audioDeviceBufferCount

the audio device buffer count

audioDeviceBufferSizeback to summary
public int audioDeviceBufferSize

the audio device buffer size in samples

audioDeviceSimultaneousSourcesback to summary
public int audioDeviceSimultaneousSources

the maximum number of sources that can be played simultaneously

bback to summary
public int b

number of bits per color channel

backgroundFPSback to summary
public int backgroundFPS

Target framerate when the window is not in the foreground. The CPU sleeps as needed. Use 0 to never sleep, -1 to not render.

depthback to summary
public int depth

number of bits for depth and stencil buffer

disableAudioback to summary
public static boolean disableAudio

If true, OpenAL will not be used. This means Application#getAudio() returns null and the gdx-openal.jar and OpenAL natives are not needed.

forceExitback to summary
public boolean forceExit

whether to call System.exit() on tear-down. Needed for Webstarts on some versions of Mac OS X it seems

foregroundFPSback to summary
public int foregroundFPS

Target framerate when the window is in the foreground. The CPU sleeps as needed. Use 0 to never sleep.

fullscreenback to summary
public boolean fullscreen

fullscreen

gback to summary
public int g

number of bits per color channel

gles30ContextMajorVersionback to summary
public int gles30ContextMajorVersion

The OpenGL context major version (the part in front of the decimal point) used to emulate OpenGL ES 3.0, when the version is not supported it will fall back to OpenGL ES 2.0 emulation. Defaults to 3.2 (major=3, minor=2). Only used when useGL30 is true. OpenGL is fully compatible with OpenGL ES 3.0 since version 4.3, setting the context version to a lower value might cause some features not to function properly. OSX requires 3.2 though.

See Also
LWJGL OSX ContextAttribs note
gles30ContextMinorVersionback to summary
public int gles30ContextMinorVersion

The OpenGL context major version (the part after the decimal point) used to emulate OpenGL ES 3.0, when the version is not supported it will fall back to OpenGL ES 2.0 emulation. Defaults to 3.2 (major=3, minor=2). Only used when useGL30 is true. OpenGL is fully compatible with OpenGL ES 3.0 since version 4.3, setting the context version to a lower value might cause some features not to function properly. OSX requires 3.2 though.

See Also
LWJGL OSX ContextAttribs note
heightback to summary
public int height

width & height of application window

iconFileTypesback to summary
pack-priv Array<Files.FileType> iconFileTypes
iconPathsback to summary
pack-priv Array<String> iconPaths
initialBackgroundColorback to summary
public Color initialBackgroundColor
maxNetThreadsback to summary
public int maxNetThreads

The maximum number of threads to use for network requests. Default is Integer#MAX_VALUE.

overrideDensityback to summary
public int overrideDensity

used to emulate screen densities

pauseWhenBackgroundback to summary
public boolean pauseWhenBackground

LifecycleListener#pause() (but continue rendering) when the window is not minimized and not the foreground window. To stop rendering when not the foreground window, use backgroundFPS -1.

pauseWhenMinimizedback to summary
public boolean pauseWhenMinimized

LifecycleListener#pause() and don't render when the window is minimized.

preferencesDirectoryback to summary
public String preferencesDirectory

Preferences directory on the desktop. Default is ".prefs/".

preferencesFileTypeback to summary
public Files.FileType preferencesFileType

Preferences file type on the desktop. Default is FileType.External

rback to summary
public int r

number of bits per color channel

resizableback to summary
public boolean resizable

whether the window is resizable

samplesback to summary
public int samples

number of samples for MSAA

setDisplayModeCallbackback to summary
public LwjglGraphics.SetDisplayModeCallback setDisplayModeCallback

Callback used when trying to create a display, can handle failures, default value is null (disabled)

stencilback to summary
public int stencil

number of bits for depth and stencil buffer

titleback to summary
public String title

title of application

undecoratedback to summary
public boolean undecorated

whether the window is undecorated

useGL30back to summary
public boolean useGL30

whether to attempt use OpenGL ES 3.0.

useHDPIback to summary
public boolean useHDPI

enable HDPI mode on Mac OS X

vSyncEnabledback to summary
public boolean vSyncEnabled

whether to enable vsync, can be changed at runtime via Graphics#setVSync(boolean)

widthback to summary
public int width

width & height of application window

xback to summary
public int x

x & y of application window, -1 for center

yback to summary
public int y

x & y of application window, -1 for center

Constructor Detail

LwjglApplicationConfigurationback to summary
public LwjglApplicationConfiguration()

Method Detail

addIconback to summary
public void addIcon(String path, Files.FileType fileType)

Adds a window icon. Icons are tried in the order added, the first one that works is used. Typically three icons should be provided: 128x128 (for Mac), 32x32 (for Windows and Linux), and 16x16 (for Windows).

getDesktopDisplayModeback to summary
public static Graphics.DisplayMode getDesktopDisplayMode()
getDisplayModesback to summary
public static Graphics.DisplayMode[] getDisplayModes()
setFromDisplayModeback to summary
public void setFromDisplayMode(Graphics.DisplayMode mode)

Sets the r, g, b and a bits per channel based on the given DisplayMode and sets the fullscreen flag to true.

com.badlogic.gdx.backends.lwjgl back to summary

protected Class LwjglApplicationConfiguration.LwjglApplicationConfigurationDisplayMode

extends DisplayMode
Class Inheritance

Field Summary

Inherited from com.badlogic.gdx.Graphics.DisplayMode:
bitsPerPixelheightrefreshRatewidth

Constructor Summary

AccessConstructor and Description
protected
LwjglApplicationConfigurationDisplayMode(int width, int height, int refreshRate, int bitsPerPixel)

Method Summary

Inherited from com.badlogic.gdx.Graphics.DisplayMode:
toString

Constructor Detail

LwjglApplicationConfigurationDisplayModeback to summary
protected LwjglApplicationConfigurationDisplayMode(int width, int height, int refreshRate, int bitsPerPixel)