Graphics interface based on Lwjgl.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| public static interface | LwjglGraphics.
A callback used by LwjglApplication when trying to create the display |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Graphics. | |
| pack-priv Canvas | |
| pack-priv LwjglApplicationConfiguration | |
| pack-priv float | |
| pack-priv static Array | 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 |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| 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. | |
| public float | |
| public float | getDensity()
Overrides com. Implements com. 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. | |
| public Graphics. | |
| public Graphics. | |
| public Graphics. | |
| public long | |
| public int | |
| public GL20 | |
| public GL30 | |
| public GL31 | |
| public GL32 | |
| public GLVersion | |
| public int | |
| public Graphics. | |
| public Graphics. | |
| public float | |
| public float | |
| public float | |
| public float | |
| public Graphics. | |
| public int | |
| public int | |
| public int | |
| public int | |
| public Graphics. | |
| public int | |
| pack-priv void | |
| public void | |
| public boolean | |
| public boolean | isFullscreen()
Implements com. Whether the app is fullscreen or not |
| public boolean | |
| public boolean | isGL30Available()
Implements com. Returns whether OpenGL ES 3.0 is available. |
| public boolean | isGL31Available()
Implements com. Returns whether OpenGL ES 3.1 is available. |
| public boolean | isGL32Available()
Implements com. Returns whether OpenGL ES 3.2 is available. |
| public boolean | |
| public Cursor | newCursor(Pixmap pixmap, int xHotspot, int yHotspot)
Implements com. Create a new cursor represented by the |
| public void | requestRendering()
Implements com. Requests a new frame to be rendered if the rendering mode is non-continuous. |
| public void | |
| public void | setContinuousRendering(boolean isContinuous)
Implements com. Sets whether to render continuously. |
| public void | setCursor(Cursor cursor)
Implements com. Only viable on the lwjgl-backend and on the gwt-backend. |
| public void | setForegroundFPS(int
fps fps)Implements com. Sets the target framerate for the application, when using continuous rendering. |
| public boolean | setFullscreenMode(Graphics.
Implements com. Sets the window to full-screen mode. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setResizable(boolean resizable)
Implements com. Display must be reconfigured via |
| public void | setSystemCursor(Cursor.
Implements com. Sets one of the predefined |
| public void | |
| public void | setUndecorated(boolean undecorated)
Implements com. Display must be reconfigured via |
| pack-priv void | |
| public void | |
| public boolean | setWindowedMode(int width, int height)
Implements com. Kindly stolen from http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen), not perfect but will do. |
| public boolean | |
| public static boolean | |
| public boolean | supportsDisplayModeChange()
Implements com. Whether the given backend supports a display mode change via calling |
| public boolean | |
| private static boolean | |
| pack-priv void |
| bufferFormat | back to summary |
|---|---|
| pack-priv Graphics. | |
| canvas | back to summary |
|---|---|
| pack-priv Canvas canvas | |
| config | back to summary |
|---|---|
| pack-priv LwjglApplicationConfiguration config | |
| deltaTime | back to summary |
|---|---|
| pack-priv float deltaTime | |
| extensions | back to summary |
|---|---|
| pack-priv static Array<String> extensions The suppored OpenGL extensions | |
| forceDisplayModeChange | back to summary |
|---|---|
| pack-priv volatile boolean forceDisplayModeChange | |
| fps | back to summary |
|---|---|
| pack-priv int fps | |
| frameId | back to summary |
|---|---|
| pack-priv long frameId | |
| frames | back to summary |
|---|---|
| pack-priv int frames | |
| frameStart | back to summary |
|---|---|
| pack-priv long frameStart | |
| gl20 | back to summary |
|---|---|
| pack-priv GL20 gl20 | |
| gl30 | back to summary |
|---|---|
| pack-priv GL30 gl30 | |
| glVersion | back to summary |
|---|---|
| pack-priv static GLVersion glVersion | |
| isContinuous | back to summary |
|---|---|
| pack-priv volatile boolean isContinuous | |
| lastTime | back to summary |
|---|---|
| pack-priv long lastTime | |
| requestRendering | back to summary |
|---|---|
| pack-priv volatile boolean requestRendering | |
| resetDeltaTime | back to summary |
|---|---|
| pack-priv boolean resetDeltaTime | |
| resize | back to summary |
|---|---|
| pack-priv boolean resize | |
| softwareMode | back to summary |
|---|---|
| pack-priv boolean softwareMode | |
| usingGL30 | back to summary |
|---|---|
| pack-priv boolean usingGL30 | |
| vsync | back to summary |
|---|---|
| pack-priv boolean vsync | |
| LwjglGraphics | back to summary |
|---|---|
| pack-priv LwjglGraphics(LwjglApplicationConfiguration config) | |
| LwjglGraphics | back to summary |
|---|---|
| pack-priv LwjglGraphics(Canvas canvas) | |
| LwjglGraphics | back to summary |
|---|---|
| pack-priv LwjglGraphics(Canvas canvas, LwjglApplicationConfiguration config) | |
| createDisplayPixelFormat | back to summary |
|---|---|
| private void createDisplayPixelFormat(boolean useGL30, int gles30ContextMajor, int gles30ContextMinor) | |
| enableCubeMapSeamless | back 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 | |
| extractExtensions | back to summary |
|---|---|
| private static void extractExtensions() | |
| extractVersion | back to summary |
|---|---|
| private static void extractVersion() | |
| fullCompatibleWithGLES2 | back to summary |
|---|---|
private static boolean fullCompatibleWithGLES2()
| |
| fullCompatibleWithGLES3 | back to summary |
|---|---|
private static boolean fullCompatibleWithGLES3()
| |
| getBackBufferHeight | back to summary |
|---|---|
| public int getBackBufferHeight() Implements com.
| |
| getBackBufferWidth | back to summary |
|---|---|
| public int getBackBufferWidth() Implements com.
| |
| getBufferFormat | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getDeltaTime | back to summary |
|---|---|
| public float getDeltaTime() Implements com. | |
| getDensity | back to summary |
|---|---|
| public float getDensity() Overrides com. Implements com. Doc from com. 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.
| |
| getDisplayMode | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getDisplayMode | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getDisplayModes | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getDisplayModes | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getFrameId | back to summary |
|---|---|
| public long getFrameId() Implements com. Doc from com. 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 | |
| getFramesPerSecond | back to summary |
|---|---|
| public int getFramesPerSecond() Implements com. | |
| getGL20 | back to summary |
|---|---|
| public GL20 getGL20() Implements com. | |
| getGL30 | back to summary |
|---|---|
| public GL30 getGL30() Implements com.
| |
| getGL31 | back to summary |
|---|---|
| public GL31 getGL31() Implements com.
| |
| getGL32 | back to summary |
|---|---|
| public GL32 getGL32() Implements com.
| |
| getGLVersion | back to summary |
|---|---|
| public GLVersion getGLVersion() Implements com. | |
| getHeight | back to summary |
|---|---|
| public int getHeight() Implements com. | |
| getMonitor | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getMonitors | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getPpcX | back to summary |
|---|---|
| public float getPpcX() Implements com.
| |
| getPpcY | back to summary |
|---|---|
| public float getPpcY() Implements com.
| |
| getPpiX | back to summary |
|---|---|
| public float getPpiX() Implements com.
| |
| getPpiY | back to summary |
|---|---|
| public float getPpiY() Implements com.
| |
| getPrimaryMonitor | back to summary |
|---|---|
| public Graphics. Implements com.
| |
| getSafeInsetBottom | back to summary |
|---|---|
| public int getSafeInsetBottom() Implements com.
| |
| getSafeInsetLeft | back to summary |
|---|---|
| public int getSafeInsetLeft() Implements com.
| |
| getSafeInsetRight | back to summary |
|---|---|
| public int getSafeInsetRight() Implements com.
| |
| getSafeInsetTop | back to summary |
|---|---|
| public int getSafeInsetTop() Implements com.
| |
| getType | back to summary |
|---|---|
| public Graphics. Implements com. | |
| getWidth | back to summary |
|---|---|
| public int getWidth() Implements com. | |
| initiateGL | back to summary |
|---|---|
| pack-priv void initiateGL() Only needed when setupDisplay() is not called. | |
| initiateGLInstances | back to summary |
|---|---|
| public void initiateGLInstances() | |
| isContinuousRendering | back to summary |
|---|---|
| public boolean isContinuousRendering() Implements com.
| |
| isFullscreen | back to summary |
|---|---|
| public boolean isFullscreen() Implements com. Doc from com. Whether the app is fullscreen or not
| |
| isGL20Available | back to summary |
|---|---|
| public boolean isGL20Available() | |
| isGL30Available | back to summary |
|---|---|
| public boolean isGL30Available() Implements com. Doc from com. Returns whether OpenGL ES 3.0 is available. If it is you can get an instance of
| |
| isGL31Available | back to summary |
|---|---|
| public boolean isGL31Available() Implements com. Doc from com. Returns whether OpenGL ES 3.1 is available. If it is you can get an instance of
| |
| isGL32Available | back to summary |
|---|---|
| public boolean isGL32Available() Implements com. Doc from com. Returns whether OpenGL ES 3.2 is available. If it is you can get an instance of
| |
| isSoftwareMode | back to summary |
|---|---|
| public boolean isSoftwareMode() | |
| newCursor | back to summary |
|---|---|
| public Cursor newCursor(Pixmap pixmap, int xHotspot, int yHotspot) Implements com. Doc from com. Create a new cursor represented by the
| |
| requestRendering | back to summary |
|---|---|
| public void requestRendering() Implements com. Doc from com. Requests a new frame to be rendered if the rendering mode is non-continuous. This method can be called from any thread.
| |
| resetDeltaTime | back 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. | |
| setContinuousRendering | back to summary |
|---|---|
| public void setContinuousRendering(boolean isContinuous) Implements com. Doc from com. Sets whether to render continuously. In case rendering is performed non-continuously, the following events will trigger a redraw:
ApplicationListener. This method can be called from any
thread.
| |
| setCursor | back to summary |
|---|---|
| public void setCursor(Cursor cursor) Implements com. Doc from com. 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
| |
| setForegroundFPS | back to summary |
|---|---|
| public void setForegroundFPS(int fps) Implements com. 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.
| |
| setFullscreenMode | back to summary |
|---|---|
| public boolean setFullscreenMode(Graphics. Implements com. Doc from com. Sets the window to full-screen mode.
| |
| setGL20 | back to summary |
|---|---|
| public void setGL20(GL20 gl20) Implements com. Doc from com. Set the GL20 instance
| |
| setGL30 | back to summary |
|---|---|
| public void setGL30(GL30 gl30) Implements com. Doc from com. Set the GL30 instance
| |
| setGL31 | back to summary |
|---|---|
| public void setGL31(GL31 gl31) Implements com. Doc from com. Set the GL31 instance
| |
| setGL32 | back to summary |
|---|---|
| public void setGL32(GL32 gl32) Implements com. Doc from com. Set the GL32 instance
| |
| setResizable | back to summary |
|---|---|
| public void setResizable(boolean resizable) Implements com. Display must be reconfigured via
| |
| setSystemCursor | back to summary |
|---|---|
| public void setSystemCursor(Cursor. Implements com. Doc from com. Sets one of the predefined
| |
| setTitle | back to summary |
|---|---|
| public void setTitle(String title) Implements com. Doc from com. Sets the title of the window. Ignored on Android.
| |
| setUndecorated | back to summary |
|---|---|
| public void setUndecorated(boolean undecorated) Implements com. Display must be reconfigured via
| |
| setupDisplay | back to summary |
|---|---|
| pack-priv void setupDisplay() throws LWJGLException | |
| setVSync | back to summary |
|---|---|
| public void setVSync(boolean vsync) Implements com. Doc from com. Enable/Disable vsynching. This is a best-effort attempt which might not work on all platforms.
| |
| setWindowedMode | back to summary |
|---|---|
| public boolean setWindowedMode(int width, int height) Implements com. Kindly stolen from http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen), not perfect but will do.
| |
| shouldRender | back to summary |
|---|---|
| public boolean shouldRender() | |
| supportsCubeMapSeamless | back to summary |
|---|---|
public static boolean supportsCubeMapSeamless()
| |
| supportsDisplayModeChange | back to summary |
|---|---|
| public boolean supportsDisplayModeChange() Implements com. Doc from com. Whether the given backend supports a display mode change via calling
| |
| supportsExtension | back to summary |
|---|---|
| public boolean supportsExtension(String extension) Implements com.
| |
| supportsFBO | back to summary |
|---|---|
| private static boolean supportsFBO() | |
| updateTime | back to summary |
|---|---|
| pack-priv void updateTime() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv DisplayMode |
| Access | Constructor and Description |
|---|---|
| public |
| mode | back to summary |
|---|---|
| pack-priv DisplayMode mode | |
| LwjglDisplayMode | back to summary |
|---|---|
| public LwjglDisplayMode(int width, int height, int refreshRate, int bitsPerPixel, DisplayMode mode) | |
| Access | Constructor and Description |
|---|---|
| protected |
| LwjglMonitor | back to summary |
|---|---|
| protected LwjglMonitor(int virtualX, int virtualY, String name) | |
| Modifier and Type | Method 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 timeIf the display creation fails, this method will be called. |
| onFailure | back 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.
| |