-
- All Implemented Interfaces:
-
android.opengl.GLSurfaceView.Renderer,com.badlogic.gdx.Graphics
public class AndroidGraphics extends AbstractGraphics implements GLSurfaceView.Renderer
An implementation of Graphics for Android.
-
-
Field Summary
Fields Modifier and Type Field Description intwidthintheightintsafeInsetLeftintsafeInsetTopintsafeInsetBottomintsafeInsetRightGLVersionglVersionprotected floatdeltaTimeprotected longframeIdprivate floatppiXprivate floatppiYprivate floatppcXprivate floatppcYprivate floatdensityprivate Graphics.BufferFormatbufferFormat
-
Constructor Summary
Constructors Constructor Description AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy)AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy, boolean focusableView)
-
Method Summary
Modifier and Type Method Description intgetWidth()intgetHeight()intgetSafeInsetLeft()intgetSafeInsetTop()intgetSafeInsetBottom()intgetSafeInsetRight()GLVersiongetGLVersion()floatgetDeltaTime()longgetFrameId()floatgetPpiX()floatgetPpiY()floatgetPpcX()floatgetPpcY()floatgetDensity()Graphics.BufferFormatgetBufferFormat()voidonPauseGLSurfaceView()voidonResumeGLSurfaceView()GL20getGL20()voidsetGL20(GL20 gl20)booleanisGL30Available()GL30getGL30()voidsetGL30(GL30 gl30)booleanisGL31Available()GL31getGL31()voidsetGL31(GL31 gl31)booleanisGL32Available()GL32getGL32()voidsetGL32(GL32 gl32)intgetBackBufferWidth()intgetBackBufferHeight()voidonSurfaceChanged(GL10 gl, int width, int height)voidonSurfaceCreated(GL10 gl, EGLConfig config)voidonDrawFrame(GL10 gl)Graphics.GraphicsTypegetType()intgetFramesPerSecond()voidclearManagedCaches()booleansupportsDisplayModeChange()booleansetFullscreenMode(Graphics.DisplayMode displayMode)Graphics.MonitorgetPrimaryMonitor()Graphics.MonitorgetMonitor()Array<Graphics.Monitor>getMonitors()Array<Graphics.DisplayMode>getDisplayModes(Graphics.Monitor monitor)Graphics.DisplayModegetDisplayMode(Graphics.Monitor monitor)Array<Graphics.DisplayMode>getDisplayModes()booleansetWindowedMode(int width, int height)voidsetTitle(String title)voidsetUndecorated(boolean undecorated)voidsetResizable(boolean resizable)Graphics.DisplayModegetDisplayMode()voidsetVSync(boolean vsync)voidsetForegroundFPS(int fps)booleansupportsExtension(String extension)voidsetContinuousRendering(boolean isContinuous)booleanisContinuousRendering()voidrequestRendering()booleanisFullscreen()CursornewCursor(Pixmap pixmap, int xHotspot, int yHotspot)voidsetCursor(Cursor cursor)voidsetSystemCursor(Cursor.SystemCursor systemCursor)-
Methods inherited from class com.badlogic.gdx.AbstractGraphics
getBackBufferScale, getDensity, getRawDeltaTime -
Methods inherited from class com.badlogic.gdx.Graphics
getBackBufferHeight, getBackBufferWidth, getBufferFormat, getDeltaTime, getDisplayMode, getDisplayModes, getFrameId, getFramesPerSecond, getGL20, getGL30, getGL31, getGL32, getGLVersion, getHeight, getMonitor, getMonitors, getPpcX, getPpcY, getPpiX, getPpiY, getPrimaryMonitor, getSafeInsetBottom, getSafeInsetLeft, getSafeInsetRight, getSafeInsetTop, getType, getWidth, isContinuousRendering, isFullscreen, isGL30Available, isGL31Available, isGL32Available, newCursor, requestRendering, setContinuousRendering, setCursor, setForegroundFPS, setFullscreenMode, setGL20, setGL30, setGL31, setGL32, setResizable, setSystemCursor, setTitle, setUndecorated, setVSync, setWindowedMode, supportsDisplayModeChange, supportsExtension -
Methods inherited from class android.opengl.GLSurfaceView.Renderer
onDrawFrame, onSurfaceChanged, onSurfaceCreated -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AndroidGraphics
AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy)
-
AndroidGraphics
AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy, boolean focusableView)
-
-
Method Detail
-
getWidth
int getWidth()
-
getHeight
int getHeight()
-
getSafeInsetLeft
int getSafeInsetLeft()
-
getSafeInsetTop
int getSafeInsetTop()
-
getSafeInsetBottom
int getSafeInsetBottom()
-
getSafeInsetRight
int getSafeInsetRight()
-
getGLVersion
GLVersion getGLVersion()
-
getDeltaTime
float getDeltaTime()
-
getFrameId
long getFrameId()
-
getPpiX
float getPpiX()
-
getPpiY
float getPpiY()
-
getPpcX
float getPpcX()
-
getPpcY
float getPpcY()
-
getDensity
float getDensity()
-
getBufferFormat
Graphics.BufferFormat getBufferFormat()
-
onPauseGLSurfaceView
void onPauseGLSurfaceView()
-
onResumeGLSurfaceView
void onResumeGLSurfaceView()
-
getGL20
GL20 getGL20()
-
setGL20
void setGL20(GL20 gl20)
-
isGL30Available
boolean isGL30Available()
-
getGL30
GL30 getGL30()
-
setGL30
void setGL30(GL30 gl30)
-
isGL31Available
boolean isGL31Available()
-
getGL31
GL31 getGL31()
-
setGL31
void setGL31(GL31 gl31)
-
isGL32Available
boolean isGL32Available()
-
getGL32
GL32 getGL32()
-
setGL32
void setGL32(GL32 gl32)
-
getBackBufferWidth
int getBackBufferWidth()
-
getBackBufferHeight
int getBackBufferHeight()
-
onSurfaceChanged
void onSurfaceChanged(GL10 gl, int width, int height)
-
onSurfaceCreated
void onSurfaceCreated(GL10 gl, EGLConfig config)
-
onDrawFrame
void onDrawFrame(GL10 gl)
-
getType
Graphics.GraphicsType getType()
-
getFramesPerSecond
int getFramesPerSecond()
-
clearManagedCaches
void clearManagedCaches()
-
supportsDisplayModeChange
boolean supportsDisplayModeChange()
-
setFullscreenMode
boolean setFullscreenMode(Graphics.DisplayMode displayMode)
-
getPrimaryMonitor
Graphics.Monitor getPrimaryMonitor()
-
getMonitor
Graphics.Monitor getMonitor()
-
getMonitors
Array<Graphics.Monitor> getMonitors()
-
getDisplayModes
Array<Graphics.DisplayMode> getDisplayModes(Graphics.Monitor monitor)
-
getDisplayMode
Graphics.DisplayMode getDisplayMode(Graphics.Monitor monitor)
-
getDisplayModes
Array<Graphics.DisplayMode> getDisplayModes()
-
setWindowedMode
boolean setWindowedMode(int width, int height)
-
setUndecorated
void setUndecorated(boolean undecorated)
-
setResizable
void setResizable(boolean resizable)
-
getDisplayMode
Graphics.DisplayMode getDisplayMode()
-
setVSync
void setVSync(boolean vsync)
-
setForegroundFPS
void setForegroundFPS(int fps)
-
supportsExtension
boolean supportsExtension(String extension)
-
setContinuousRendering
void setContinuousRendering(boolean isContinuous)
-
isContinuousRendering
boolean isContinuousRendering()
-
requestRendering
void requestRendering()
-
isFullscreen
boolean isFullscreen()
-
newCursor
Cursor newCursor(Pixmap pixmap, int xHotspot, int yHotspot)
-
setCursor
void setCursor(Cursor cursor)
-
setSystemCursor
void setSystemCursor(Cursor.SystemCursor systemCursor)
-
-
-
-