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

public Class LwjglGraphics

extends AbstractGraphics
Class Inheritance
Imports
java.awt.Canvas, .Toolkit, java.nio.Buffer, .ByteBuffer, com.badlogic.gdx.AbstractGraphics, .Application, .Gdx, .Graphics, com.badlogic.gdx.graphics.glutils.GLVersion, com.badlogic.gdx.utils.Os, .Array, .GdxRuntimeException, .SharedLibraryLoader, org.lwjgl.LWJGLException, org.lwjgl.input.Mouse, org.lwjgl.opengl.ContextAttribs, .Display, .GL11, .PixelFormat, com.badlogic.gdx.graphics.Cursor.SystemCursor, .GL20, .GL30, .GL31, .GL32, .Pixmap, .Pixmap.Blending, .Pixmap.Format

An implementation of the Graphics interface based on Lwjgl.
Author
mzechner

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
public static interface
LwjglGraphics.SetDisplayModeCallback

A callback used by LwjglApplication when trying to create the display

Field Summary

Modifier and TypeField and Description
pack-priv Graphics.BufferFormat
pack-priv Canvas
pack-priv LwjglApplicationConfiguration
pack-priv float
pack-priv static Array<String>
extensions

The suppored OpenGL extensions

pack-priv volatile boolean
pack-priv int
pack-priv long
pack-priv int
pack-priv long
pack-priv GL20
pack-priv GL30
pack-priv static GLVersion
pack-priv volatile boolean
pack-priv long
pack-priv volatile boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
createDisplayPixelFormat(boolean useGL30, int gles30ContextMajor, int gles30ContextMinor)

public void
enableCubeMapSeamless(boolean enable)

Enable or disable cubemap seamless feature.

private static void
private static void
private static boolean
fullCompatibleWithGLES2()

Returns: whether the supported OpenGL (not ES) version is compatible with OpenGL ES 2.x.

private static boolean
fullCompatibleWithGLES3()

Returns: whether the supported OpenGL (not ES) version is compatible with OpenGL ES 3.x.

public int
public int
public Graphics.BufferFormat
public float
public float
getDensity()

Overrides com.badlogic.gdx.AbstractGraphics.getDensity.

Implements com.badlogic.gdx.Graphics.getDensity.

This is a scaling factor for the Density Independent Pixel unit, following the same conventions as android.util.DisplayMetrics#density, where one DIP is one pixel on an approximately 160 dpi screen.

public Graphics.DisplayMode
public Graphics.DisplayMode
public Graphics.DisplayMode[]
public Graphics.DisplayMode[]
public long
getFrameId()

Implements com.badlogic.gdx.Graphics.getFrameId.

Returns the id of the current frame.

public int
public GL20
public GL30
public GL31
public GL32
public GLVersion
public int
public Graphics.Monitor
public Graphics.Monitor[]
public float
public float
public float
public float
public Graphics.Monitor
public int
public int
public int
public int
public Graphics.GraphicsType
public int
pack-priv void
initiateGL()

Only needed when setupDisplay() is not called.

public void
public boolean
public boolean
isFullscreen()

Implements com.badlogic.gdx.Graphics.isFullscreen.

Whether the app is fullscreen or not

public boolean
public boolean
isGL30Available()

Implements com.badlogic.gdx.Graphics.isGL30Available.

Returns whether OpenGL ES 3.0 is available.

public boolean
isGL31Available()

Implements com.badlogic.gdx.Graphics.isGL31Available.

Returns whether OpenGL ES 3.1 is available.

public boolean
isGL32Available()

Implements com.badlogic.gdx.Graphics.isGL32Available.

Returns whether OpenGL ES 3.2 is available.

public boolean
public Cursor
newCursor(Pixmap pixmap, int xHotspot, int yHotspot)

Implements com.badlogic.gdx.Graphics.newCursor.

Create a new cursor represented by the com.badlogic.gdx.graphics.Pixmap.

public void
requestRendering()

Implements com.badlogic.gdx.Graphics.requestRendering.

Requests a new frame to be rendered if the rendering mode is non-continuous.

public void
resetDeltaTime()

The delta time for the next frame will be 0.

public void
setContinuousRendering(boolean isContinuous)

Implements com.badlogic.gdx.Graphics.setContinuousRendering.

Sets whether to render continuously.

public void
setCursor(Cursor cursor)

Implements com.badlogic.gdx.Graphics.setCursor.

Only viable on the lwjgl-backend and on the gwt-backend.

public void
setForegroundFPS(int
fps
fps
)

Implements com.badlogic.gdx.Graphics.setForegroundFPS.

Sets the target framerate for the application, when using continuous rendering.

public boolean
setFullscreenMode(Graphics.DisplayMode displayMode)

Implements com.badlogic.gdx.Graphics.setFullscreenMode.

Sets the window to full-screen mode.

public void
setGL20(GL20 gl20)

Implements com.badlogic.gdx.Graphics.setGL20.

Set the GL20 instance

public void
setGL30(GL30 gl30)

Implements com.badlogic.gdx.Graphics.setGL30.

Set the GL30 instance

public void
setGL31(GL31 gl31)

Implements com.badlogic.gdx.Graphics.setGL31.

Set the GL31 instance

public void
setGL32(GL32 gl32)

Implements com.badlogic.gdx.Graphics.setGL32.

Set the GL32 instance

public void
setResizable(boolean resizable)

Implements com.badlogic.gdx.Graphics.setResizable.

Display must be reconfigured via setWindowedMode(int, int) for the changes to take effect.

public void
setSystemCursor(Cursor.SystemCursor systemCursor)

Implements com.badlogic.gdx.Graphics.setSystemCursor.

Sets one of the predefined SystemCursors

public void
setTitle(String title)

Implements com.badlogic.gdx.Graphics.setTitle.

Sets the title of the window.

public void
setUndecorated(boolean undecorated)

Implements com.badlogic.gdx.Graphics.setUndecorated.

Display must be reconfigured via setWindowedMode(int, int) for the changes to take effect.

pack-priv void
public void
setVSync(boolean vsync)

Implements com.badlogic.gdx.Graphics.setVSync.

Enable/Disable vsynching.

public boolean
setWindowedMode(int width, int height)

Implements com.badlogic.gdx.Graphics.setWindowedMode.

Kindly stolen from http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen), not perfect but will do.

public boolean
public static boolean
supportsCubeMapSeamless()

Returns: whether cubemap seamless feature is supported.

public boolean
supportsDisplayModeChange()

Implements com.badlogic.gdx.Graphics.supportsDisplayModeChange.

Whether the given backend supports a display mode change via calling Graphics#setFullscreenMode(DisplayMode)

public boolean
private static boolean
pack-priv void
Inherited from com.badlogic.gdx.AbstractGraphics:
getBackBufferScalegetRawDeltaTime

Field Detail

bufferFormatback to summary
pack-priv Graphics.BufferFormat bufferFormat
canvasback to summary
pack-priv Canvas canvas
configback to summary
pack-priv LwjglApplicationConfiguration config
deltaTimeback to summary
pack-priv float deltaTime
extensionsback to summary
pack-priv static Array<String> extensions

The suppored OpenGL extensions

forceDisplayModeChangeback to summary
pack-priv volatile boolean forceDisplayModeChange
fpsback to summary
pack-priv int fps
frameIdback to summary
pack-priv long frameId
framesback to summary
pack-priv int frames
frameStartback to summary
pack-priv long frameStart
gl20back to summary
pack-priv GL20 gl20
gl30back to summary
pack-priv GL30 gl30
glVersionback to summary
pack-priv static GLVersion glVersion
isContinuousback to summary
pack-priv volatile boolean isContinuous
lastTimeback to summary
pack-priv long lastTime
requestRenderingback to summary
pack-priv volatile boolean requestRendering
resetDeltaTimeback to summary
pack-priv boolean resetDeltaTime
resizeback to summary
pack-priv boolean resize
softwareModeback to summary
pack-priv boolean softwareMode
usingGL30back to summary
pack-priv boolean usingGL30
vsyncback to summary
pack-priv boolean vsync

Constructor Detail

LwjglGraphicsback to summary
pack-priv LwjglGraphics(LwjglApplicationConfiguration config)
LwjglGraphicsback to summary
pack-priv LwjglGraphics(Canvas canvas)
LwjglGraphicsback to summary
pack-priv LwjglGraphics(Canvas canvas, LwjglApplicationConfiguration config)

Method Detail

createDisplayPixelFormatback to summary
private void createDisplayPixelFormat(boolean useGL30, int gles30ContextMajor, int gles30ContextMinor)
enableCubeMapSeamlessback to summary
public void enableCubeMapSeamless(boolean enable)

Enable or disable cubemap seamless feature. Default is true if supported. Should only be called if this feature is supported. (see supportsCubeMapSeamless())

extractExtensionsback to summary
private static void extractExtensions()
extractVersionback to summary
private static void extractVersion()
fullCompatibleWithGLES2back to summary
private static boolean fullCompatibleWithGLES2()
Returns:boolean

whether the supported OpenGL (not ES) version is compatible with OpenGL ES 2.x.

fullCompatibleWithGLES3back to summary
private static boolean fullCompatibleWithGLES3()
Returns:boolean

whether the supported OpenGL (not ES) version is compatible with OpenGL ES 3.x.

getBackBufferHeightback to summary
public int getBackBufferHeight()

Implements com.badlogic.gdx.Graphics.getBackBufferHeight.

Annotations
@Override
getBackBufferWidthback to summary
public int getBackBufferWidth()

Implements com.badlogic.gdx.Graphics.getBackBufferWidth.

Annotations
@Override
getBufferFormatback to summary
public Graphics.BufferFormat getBufferFormat()

Implements com.badlogic.gdx.Graphics.getBufferFormat.

Annotations
@Override
getDeltaTimeback to summary
public float getDeltaTime()

Implements com.badlogic.gdx.Graphics.getDeltaTime.

getDensityback to summary
public float getDensity()

Overrides com.badlogic.gdx.AbstractGraphics.getDensity.

Implements com.badlogic.gdx.Graphics.getDensity.

Doc from com.badlogic.gdx.Graphics.getDensity.

This is a scaling factor for the Density Independent Pixel unit, following the same conventions as android.util.DisplayMetrics#density, where one DIP is one pixel on an approximately 160 dpi screen. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc. If the density could not be determined, this returns a default value of 1. Depending on the underlying platform implementation this might be a relatively expensive operation. Therefore it should not be called continously on each frame.

Annotations
@Override
getDisplayModeback to summary
public Graphics.DisplayMode getDisplayMode(Graphics.Monitor monitor)

Implements com.badlogic.gdx.Graphics.getDisplayMode.

Annotations
@Override
getDisplayModeback to summary
public Graphics.DisplayMode getDisplayMode()

Implements com.badlogic.gdx.Graphics.getDisplayMode.

Annotations
@Override
getDisplayModesback to summary
public Graphics.DisplayMode[] getDisplayModes(Graphics.Monitor monitor)

Implements com.badlogic.gdx.Graphics.getDisplayModes.

Annotations
@Override
getDisplayModesback to summary
public Graphics.DisplayMode[] getDisplayModes()

Implements com.badlogic.gdx.Graphics.getDisplayModes.

Annotations
@Override
getFrameIdback to summary
public long getFrameId()

Implements com.badlogic.gdx.Graphics.getFrameId.

Doc from com.badlogic.gdx.Graphics.getFrameId.

Returns the id of the current frame. The general contract of this method is that the id is incremented only when the application is in the running state right before calling the ApplicationListener#render() method. Also, the id of the first frame is 0; the id of subsequent frames is guaranteed to take increasing values for 263-1 rendering cycles.

getFramesPerSecondback to summary
public int getFramesPerSecond()

Implements com.badlogic.gdx.Graphics.getFramesPerSecond.

getGL20back to summary
public GL20 getGL20()

Implements com.badlogic.gdx.Graphics.getGL20.

getGL30back to summary
public GL30 getGL30()

Implements com.badlogic.gdx.Graphics.getGL30.

Annotations
@Override
getGL31back to summary
public GL31 getGL31()

Implements com.badlogic.gdx.Graphics.getGL31.

Annotations
@Override
getGL32back to summary
public GL32 getGL32()

Implements com.badlogic.gdx.Graphics.getGL32.

Annotations
@Override
getGLVersionback to summary
public GLVersion getGLVersion()

Implements com.badlogic.gdx.Graphics.getGLVersion.

getHeightback to summary
public int getHeight()

Implements com.badlogic.gdx.Graphics.getHeight.

getMonitorback to summary
public Graphics.Monitor getMonitor()

Implements com.badlogic.gdx.Graphics.getMonitor.

Annotations
@Override
getMonitorsback to summary
public Graphics.Monitor[] getMonitors()

Implements com.badlogic.gdx.Graphics.getMonitors.

Annotations
@Override
getPpcXback to summary
public float getPpcX()

Implements com.badlogic.gdx.Graphics.getPpcX.

Annotations
@Override
getPpcYback to summary
public float getPpcY()

Implements com.badlogic.gdx.Graphics.getPpcY.

Annotations
@Override
getPpiXback to summary
public float getPpiX()

Implements com.badlogic.gdx.Graphics.getPpiX.

Annotations
@Override
getPpiYback to summary
public float getPpiY()

Implements com.badlogic.gdx.Graphics.getPpiY.

Annotations
@Override
getPrimaryMonitorback to summary
public Graphics.Monitor getPrimaryMonitor()

Implements com.badlogic.gdx.Graphics.getPrimaryMonitor.

Annotations
@Override
getSafeInsetBottomback to summary
public int getSafeInsetBottom()

Implements com.badlogic.gdx.Graphics.getSafeInsetBottom.

Annotations
@Override
getSafeInsetLeftback to summary
public int getSafeInsetLeft()

Implements com.badlogic.gdx.Graphics.getSafeInsetLeft.

Annotations
@Override
getSafeInsetRightback to summary
public int getSafeInsetRight()

Implements com.badlogic.gdx.Graphics.getSafeInsetRight.

Annotations
@Override
getSafeInsetTopback to summary
public int getSafeInsetTop()

Implements com.badlogic.gdx.Graphics.getSafeInsetTop.

Annotations
@Override
getTypeback to summary
public Graphics.GraphicsType getType()

Implements com.badlogic.gdx.Graphics.getType.

getWidthback to summary
public int getWidth()

Implements com.badlogic.gdx.Graphics.getWidth.

initiateGLback to summary
pack-priv void initiateGL()

Only needed when setupDisplay() is not called.

initiateGLInstancesback to summary
public void initiateGLInstances()
isContinuousRenderingback to summary
public boolean isContinuousRendering()

Implements com.badlogic.gdx.Graphics.isContinuousRendering.

Annotations
@Override
isFullscreenback to summary
public boolean isFullscreen()

Implements com.badlogic.gdx.Graphics.isFullscreen.

Doc from com.badlogic.gdx.Graphics.isFullscreen.

Whether the app is fullscreen or not

Annotations
@Override
isGL20Availableback to summary
public boolean isGL20Available()
isGL30Availableback to summary
public boolean isGL30Available()

Implements com.badlogic.gdx.Graphics.isGL30Available.

Doc from com.badlogic.gdx.Graphics.isGL30Available.

Returns whether OpenGL ES 3.0 is available. If it is you can get an instance of GL30 via getGL30() to access OpenGL ES 3.0 functionality. Note that this functionality will only be available if you instructed the Application instance to use OpenGL ES 3.0!

Annotations
@Override
isGL31Availableback to summary
public boolean isGL31Available()

Implements com.badlogic.gdx.Graphics.isGL31Available.

Doc from com.badlogic.gdx.Graphics.isGL31Available.

Returns whether OpenGL ES 3.1 is available. If it is you can get an instance of GL31 via getGL31() to access OpenGL ES 3.1 functionality. Note that this functionality will only be available if you instructed the Application instance to use OpenGL ES 3.1!

Annotations
@Override
isGL32Availableback to summary
public boolean isGL32Available()

Implements com.badlogic.gdx.Graphics.isGL32Available.

Doc from com.badlogic.gdx.Graphics.isGL32Available.

Returns whether OpenGL ES 3.2 is available. If it is you can get an instance of GL32 via getGL32() to access OpenGL ES 3.2 functionality. Note that this functionality will only be available if you instructed the Application instance to use OpenGL ES 3.2!

Annotations
@Override
isSoftwareModeback to summary
public boolean isSoftwareMode()
newCursorback to summary
public Cursor newCursor(Pixmap pixmap, int xHotspot, int yHotspot)

Implements com.badlogic.gdx.Graphics.newCursor.

Doc from com.badlogic.gdx.Graphics.newCursor.

Create a new cursor represented by the com.badlogic.gdx.graphics.Pixmap. The Pixmap must be in RGBA8888 format, width & height must be powers-of-two greater than zero (not necessarily equal) and of a certain minimum size (32x32 is a safe bet), and alpha transparency must be single-bit (i.e., 0x00 or 0xFF only). This function returns a Cursor object that can be set as the system cursor by calling setCursor(Cursor) .

Annotations
@Override
requestRenderingback to summary
public void requestRendering()

Implements com.badlogic.gdx.Graphics.requestRendering.

Doc from com.badlogic.gdx.Graphics.requestRendering.

Requests a new frame to be rendered if the rendering mode is non-continuous. This method can be called from any thread.

Annotations
@Override
resetDeltaTimeback to summary
public void resetDeltaTime()

The delta time for the next frame will be 0. This can be useful if the render thread was blocked for some time to prevent game state or animations from advancing.

setContinuousRenderingback to summary
public void setContinuousRendering(boolean isContinuous)

Implements com.badlogic.gdx.Graphics.setContinuousRendering.

Doc from com.badlogic.gdx.Graphics.setContinuousRendering.

Sets whether to render continuously. In case rendering is performed non-continuously, the following events will trigger a redraw:

  • A call to requestRendering()
  • Input events from the touch screen/mouse or keyboard
  • A Runnable is posted to the rendering thread via Application#postRunnable(Runnable). In the case of a multi-window app, all windows will request rendering if a runnable is posted to the application. To avoid this, post a runnable to the window instead.
Life-cycle events will also be reported as usual, see ApplicationListener. This method can be called from any thread.
Annotations
@Override
setCursorback to summary
public void setCursor(Cursor cursor)

Implements com.badlogic.gdx.Graphics.setCursor.

Doc from com.badlogic.gdx.Graphics.setCursor.

Only viable on the lwjgl-backend and on the gwt-backend. Browsers that support cursor:url() and support the png format (the pixmap is converted to a data-url of type image/png) should also support custom cursors. Will set the mouse cursor image to the image represented by the com.badlogic.gdx.graphics.Cursor. It is recommended to call this function in the main render thread, and maximum one time per frame.

Annotations
@Override
setForegroundFPSback to summary
public void setForegroundFPS(int fps)

Implements com.badlogic.gdx.Graphics.setForegroundFPS.

Sets the target framerate for the application, when using continuous rendering. Must be positive. The cpu sleeps as needed. Use 0 to never sleep. Default is 60.

Parameters
fps:int

fps

Annotations
@Override
setFullscreenModeback to summary
public boolean setFullscreenMode(Graphics.DisplayMode displayMode)

Implements com.badlogic.gdx.Graphics.setFullscreenMode.

Doc from com.badlogic.gdx.Graphics.setFullscreenMode.

Sets the window to full-screen mode.

Annotations
@Override
setGL20back to summary
public void setGL20(GL20 gl20)

Implements com.badlogic.gdx.Graphics.setGL20.

Doc from com.badlogic.gdx.Graphics.setGL20.

Set the GL20 instance

Annotations
@Override
setGL30back to summary
public void setGL30(GL30 gl30)

Implements com.badlogic.gdx.Graphics.setGL30.

Doc from com.badlogic.gdx.Graphics.setGL30.

Set the GL30 instance

Annotations
@Override
setGL31back to summary
public void setGL31(GL31 gl31)

Implements com.badlogic.gdx.Graphics.setGL31.

Doc from com.badlogic.gdx.Graphics.setGL31.

Set the GL31 instance

Annotations
@Override
setGL32back to summary
public void setGL32(GL32 gl32)

Implements com.badlogic.gdx.Graphics.setGL32.

Doc from com.badlogic.gdx.Graphics.setGL32.

Set the GL32 instance

Annotations
@Override
setResizableback to summary
public void setResizable(boolean resizable)

Implements com.badlogic.gdx.Graphics.setResizable.

Display must be reconfigured via setWindowedMode(int, int) for the changes to take effect.

Annotations
@Override
setSystemCursorback to summary
public void setSystemCursor(Cursor.SystemCursor systemCursor)

Implements com.badlogic.gdx.Graphics.setSystemCursor.

Doc from com.badlogic.gdx.Graphics.setSystemCursor.

Sets one of the predefined SystemCursors

Annotations
@Override
setTitleback to summary
public void setTitle(String title)

Implements com.badlogic.gdx.Graphics.setTitle.

Doc from com.badlogic.gdx.Graphics.setTitle.

Sets the title of the window. Ignored on Android.

Annotations
@Override
setUndecoratedback to summary
public void setUndecorated(boolean undecorated)

Implements com.badlogic.gdx.Graphics.setUndecorated.

Display must be reconfigured via setWindowedMode(int, int) for the changes to take effect.

Annotations
@Override
setupDisplayback to summary
pack-priv void setupDisplay() throws LWJGLException
setVSyncback to summary
public void setVSync(boolean vsync)

Implements com.badlogic.gdx.Graphics.setVSync.

Doc from com.badlogic.gdx.Graphics.setVSync.

Enable/Disable vsynching. This is a best-effort attempt which might not work on all platforms.

Annotations
@Override
setWindowedModeback to summary
public boolean setWindowedMode(int width, int height)

Implements com.badlogic.gdx.Graphics.setWindowedMode.

Kindly stolen from http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen), not perfect but will do.

Annotations
@Override
shouldRenderback to summary
public boolean shouldRender()
supportsCubeMapSeamlessback to summary
public static boolean supportsCubeMapSeamless()
Returns:boolean

whether cubemap seamless feature is supported.

supportsDisplayModeChangeback to summary
public boolean supportsDisplayModeChange()

Implements com.badlogic.gdx.Graphics.supportsDisplayModeChange.

Doc from com.badlogic.gdx.Graphics.supportsDisplayModeChange.

Whether the given backend supports a display mode change via calling Graphics#setFullscreenMode(DisplayMode)

Annotations
@Override
supportsExtensionback to summary
public boolean supportsExtension(String extension)

Implements com.badlogic.gdx.Graphics.supportsExtension.

Annotations
@Override
supportsFBOback to summary
private static boolean supportsFBO()
updateTimeback to summary
pack-priv void updateTime()
com.badlogic.gdx.backends.lwjgl back to summary

private Class LwjglGraphics.LwjglDisplayMode

extends DisplayMode
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv DisplayMode
Inherited from com.badlogic.gdx.Graphics.DisplayMode:
bitsPerPixelheightrefreshRatewidth

Constructor Summary

AccessConstructor and Description
public
LwjglDisplayMode(int width, int height, int refreshRate, int bitsPerPixel, DisplayMode mode)

Method Summary

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

Field Detail

modeback to summary
pack-priv DisplayMode mode

Constructor Detail

LwjglDisplayModeback to summary
public LwjglDisplayMode(int width, int height, int refreshRate, int bitsPerPixel, DisplayMode mode)
com.badlogic.gdx.backends.lwjgl back to summary

private Class LwjglGraphics.LwjglMonitor

extends Monitor
Class Inheritance

Field Summary

Inherited from com.badlogic.gdx.Graphics.Monitor:
namevirtualXvirtualY

Constructor Summary

AccessConstructor and Description
protected
LwjglMonitor(int virtualX, int virtualY, String name)

Constructor Detail

LwjglMonitorback to summary
protected LwjglMonitor(int virtualX, int virtualY, String name)
com.badlogic.gdx.backends.lwjgl back to summary

public Interface LwjglGraphics.SetDisplayModeCallback


A callback used by LwjglApplication when trying to create the display

Method Summary

Modifier and TypeMethod and Description
public LwjglApplicationConfiguration

Returns:

the configuration to be used for a second attempt at creating a display. A null value results in NOT attempting to create the display a second time
onFailure
(LwjglApplicationConfiguration initialConfig)

If the display creation fails, this method will be called.

Method Detail

onFailureback to summary
public LwjglApplicationConfiguration onFailure(LwjglApplicationConfiguration initialConfig)

If the display creation fails, this method will be called. Suggested usage is to modify the passed configuration to use a common width and height, and set fullscreen to false.

Returns:LwjglApplicationConfiguration

the configuration to be used for a second attempt at creating a display. A null value results in NOT attempting to create the display a second time