Class MockGraphics
- java.lang.Object
-
- com.badlogic.gdx.AbstractGraphics
-
- com.badlogic.gdx.backends.headless.mock.graphics.MockGraphics
-
- All Implemented Interfaces:
com.badlogic.gdx.Graphics
public class MockGraphics extends com.badlogic.gdx.AbstractGraphicsThe headless backend does its best to mock elements. This is intended to make code-sharing between server and client as simple as possible.
-
-
Constructor Summary
Constructors Constructor Description MockGraphics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBackBufferHeight()intgetBackBufferWidth()com.badlogic.gdx.Graphics.BufferFormatgetBufferFormat()floatgetDeltaTime()com.badlogic.gdx.Graphics.DisplayModegetDisplayMode()com.badlogic.gdx.Graphics.DisplayModegetDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor)com.badlogic.gdx.Graphics.DisplayMode[]getDisplayModes()com.badlogic.gdx.Graphics.DisplayMode[]getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor)longgetFrameId()intgetFramesPerSecond()com.badlogic.gdx.graphics.GL20getGL20()com.badlogic.gdx.graphics.GL30getGL30()com.badlogic.gdx.graphics.GL31getGL31()com.badlogic.gdx.graphics.GL32getGL32()com.badlogic.gdx.graphics.glutils.GLVersiongetGLVersion()intgetHeight()com.badlogic.gdx.Graphics.MonitorgetMonitor()com.badlogic.gdx.Graphics.Monitor[]getMonitors()floatgetPpcX()floatgetPpcY()floatgetPpiX()floatgetPpiY()com.badlogic.gdx.Graphics.MonitorgetPrimaryMonitor()intgetSafeInsetBottom()intgetSafeInsetLeft()intgetSafeInsetRight()intgetSafeInsetTop()longgetTargetRenderInterval()com.badlogic.gdx.Graphics.GraphicsTypegetType()intgetWidth()voidincrementFrameId()booleanisContinuousRendering()booleanisFullscreen()booleanisGL30Available()booleanisGL31Available()booleanisGL32Available()com.badlogic.gdx.graphics.CursornewCursor(com.badlogic.gdx.graphics.Pixmap pixmap, int xHotspot, int yHotspot)voidrequestRendering()voidsetContinuousRendering(boolean isContinuous)voidsetCursor(com.badlogic.gdx.graphics.Cursor cursor)voidsetForegroundFPS(int fps)Sets the target framerate for the application.booleansetFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode)voidsetGL20(com.badlogic.gdx.graphics.GL20 gl20)voidsetGL30(com.badlogic.gdx.graphics.GL30 gl30)voidsetGL31(com.badlogic.gdx.graphics.GL31 gl31)voidsetGL32(com.badlogic.gdx.graphics.GL32 gl32)voidsetResizable(boolean resizable)voidsetSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)voidsetTitle(java.lang.String title)voidsetUndecorated(boolean undecorated)voidsetVSync(boolean vsync)booleansetWindowedMode(int width, int height)booleansupportsDisplayModeChange()booleansupportsExtension(java.lang.String extension)voidupdateTime()
-
-
-
Method Detail
-
isGL30Available
public boolean isGL30Available()
-
isGL31Available
public boolean isGL31Available()
-
isGL32Available
public boolean isGL32Available()
-
getGL20
public com.badlogic.gdx.graphics.GL20 getGL20()
-
setGL20
public void setGL20(com.badlogic.gdx.graphics.GL20 gl20)
-
getGL30
public com.badlogic.gdx.graphics.GL30 getGL30()
-
setGL30
public void setGL30(com.badlogic.gdx.graphics.GL30 gl30)
-
getGL31
public com.badlogic.gdx.graphics.GL31 getGL31()
-
setGL31
public void setGL31(com.badlogic.gdx.graphics.GL31 gl31)
-
getGL32
public com.badlogic.gdx.graphics.GL32 getGL32()
-
setGL32
public void setGL32(com.badlogic.gdx.graphics.GL32 gl32)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getBackBufferWidth
public int getBackBufferWidth()
-
getBackBufferHeight
public int getBackBufferHeight()
-
getFrameId
public long getFrameId()
-
getDeltaTime
public float getDeltaTime()
-
getFramesPerSecond
public int getFramesPerSecond()
-
getType
public com.badlogic.gdx.Graphics.GraphicsType getType()
-
getGLVersion
public com.badlogic.gdx.graphics.glutils.GLVersion getGLVersion()
-
getPpiX
public float getPpiX()
-
getPpiY
public float getPpiY()
-
getPpcX
public float getPpcX()
-
getPpcY
public float getPpcY()
-
supportsDisplayModeChange
public boolean supportsDisplayModeChange()
-
getDisplayModes
public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes()
-
getDisplayMode
public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode()
-
getSafeInsetLeft
public int getSafeInsetLeft()
-
getSafeInsetTop
public int getSafeInsetTop()
-
getSafeInsetBottom
public int getSafeInsetBottom()
-
getSafeInsetRight
public int getSafeInsetRight()
-
setFullscreenMode
public boolean setFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode)
-
setWindowedMode
public boolean setWindowedMode(int width, int height)
-
setTitle
public void setTitle(java.lang.String title)
-
setVSync
public void setVSync(boolean vsync)
-
setForegroundFPS
public void setForegroundFPS(int fps)
Sets the target framerate for the application. Use 0 to never sleep; negative to not call the render method at all. Default is 60.- Parameters:
fps- fps
-
getTargetRenderInterval
public long getTargetRenderInterval()
-
getBufferFormat
public com.badlogic.gdx.Graphics.BufferFormat getBufferFormat()
-
supportsExtension
public boolean supportsExtension(java.lang.String extension)
-
setContinuousRendering
public void setContinuousRendering(boolean isContinuous)
-
isContinuousRendering
public boolean isContinuousRendering()
-
requestRendering
public void requestRendering()
-
isFullscreen
public boolean isFullscreen()
-
updateTime
public void updateTime()
-
incrementFrameId
public void incrementFrameId()
-
newCursor
public com.badlogic.gdx.graphics.Cursor newCursor(com.badlogic.gdx.graphics.Pixmap pixmap, int xHotspot, int yHotspot)
-
setCursor
public void setCursor(com.badlogic.gdx.graphics.Cursor cursor)
-
setSystemCursor
public void setSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)
-
getPrimaryMonitor
public com.badlogic.gdx.Graphics.Monitor getPrimaryMonitor()
-
getMonitor
public com.badlogic.gdx.Graphics.Monitor getMonitor()
-
getMonitors
public com.badlogic.gdx.Graphics.Monitor[] getMonitors()
-
getDisplayModes
public com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor)
-
getDisplayMode
public com.badlogic.gdx.Graphics.DisplayMode getDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor)
-
setUndecorated
public void setUndecorated(boolean undecorated)
-
setResizable
public void setResizable(boolean resizable)
-
-