public class AndroidGraphics
extends java.lang.Object
implements com.badlogic.gdx.Graphics, android.opengl.GLSurfaceView.Renderer
Graphics for Android.| Modifier and Type | Field and Description |
|---|---|
protected AndroidApplicationConfiguration |
config |
protected float |
deltaTime |
protected int |
fps |
protected long |
frameId |
protected int |
frames |
protected long |
frameStart |
protected long |
lastFrameTime |
| Constructor and Description |
|---|
AndroidGraphics(AndroidApplicationBase application,
AndroidApplicationConfiguration config,
ResolutionStrategy resolutionStrategy) |
AndroidGraphics(AndroidApplicationBase application,
AndroidApplicationConfiguration config,
ResolutionStrategy resolutionStrategy,
boolean focusableView) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkGL20() |
void |
clearManagedCaches() |
protected GLSurfaceView20 |
createGLSurfaceView(AndroidApplicationBase application,
ResolutionStrategy resolutionStrategy) |
int |
getBackBufferHeight() |
int |
getBackBufferWidth() |
com.badlogic.gdx.Graphics.BufferFormat |
getBufferFormat() |
float |
getDeltaTime() |
float |
getDensity() |
com.badlogic.gdx.Graphics.DisplayMode |
getDisplayMode() |
com.badlogic.gdx.Graphics.DisplayMode |
getDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor) |
com.badlogic.gdx.Graphics.DisplayMode[] |
getDisplayModes() |
com.badlogic.gdx.Graphics.DisplayMode[] |
getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor) |
protected android.opengl.GLSurfaceView.EGLConfigChooser |
getEglConfigChooser() |
long |
getFrameId() |
int |
getFramesPerSecond() |
com.badlogic.gdx.graphics.GL20 |
getGL20() |
com.badlogic.gdx.graphics.GL30 |
getGL30() |
com.badlogic.gdx.graphics.glutils.GLVersion |
getGLVersion() |
int |
getHeight() |
com.badlogic.gdx.Graphics.Monitor |
getMonitor() |
com.badlogic.gdx.Graphics.Monitor[] |
getMonitors() |
float |
getPpcX() |
float |
getPpcY() |
float |
getPpiX() |
float |
getPpiY() |
com.badlogic.gdx.Graphics.Monitor |
getPrimaryMonitor() |
float |
getRawDeltaTime() |
int |
getSafeInsetBottom() |
int |
getSafeInsetLeft() |
int |
getSafeInsetRight() |
int |
getSafeInsetTop() |
com.badlogic.gdx.Graphics.GraphicsType |
getType() |
android.view.View |
getView() |
int |
getWidth() |
boolean |
isContinuousRendering() |
boolean |
isFullscreen() |
boolean |
isGL30Available() |
protected void |
logConfig(javax.microedition.khronos.egl.EGLConfig config) |
protected void |
logManagedCachesStatus() |
com.badlogic.gdx.graphics.Cursor |
newCursor(com.badlogic.gdx.graphics.Pixmap pixmap,
int xHotspot,
int yHotspot) |
void |
onDrawFrame(javax.microedition.khronos.opengles.GL10 gl) |
void |
onPauseGLSurfaceView() |
void |
onResumeGLSurfaceView() |
void |
onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl,
int width,
int height) |
void |
onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl,
javax.microedition.khronos.egl.EGLConfig config) |
protected void |
preserveEGLContextOnPause() |
void |
requestRendering() |
void |
setContinuousRendering(boolean isContinuous) |
void |
setCursor(com.badlogic.gdx.graphics.Cursor cursor) |
boolean |
setFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode) |
void |
setGL20(com.badlogic.gdx.graphics.GL20 gl20) |
void |
setGL30(com.badlogic.gdx.graphics.GL30 gl30) |
void |
setResizable(boolean resizable) |
void |
setSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor) |
void |
setTitle(java.lang.String title) |
void |
setUndecorated(boolean undecorated) |
protected void |
setupGL(javax.microedition.khronos.opengles.GL10 gl)
This instantiates the GL10, GL11 and GL20 instances.
|
void |
setVSync(boolean vsync) |
boolean |
setWindowedMode(int width,
int height) |
boolean |
supportsDisplayModeChange() |
boolean |
supportsExtension(java.lang.String extension) |
protected void |
updatePpi() |
protected void |
updateSafeAreaInsets() |
protected long lastFrameTime
protected float deltaTime
protected long frameStart
protected long frameId
protected int frames
protected int fps
protected final AndroidApplicationConfiguration config
public AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy)
public AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy, boolean focusableView)
protected void preserveEGLContextOnPause()
protected GLSurfaceView20 createGLSurfaceView(AndroidApplicationBase application, ResolutionStrategy resolutionStrategy)
public void onPauseGLSurfaceView()
public void onResumeGLSurfaceView()
protected android.opengl.GLSurfaceView.EGLConfigChooser getEglConfigChooser()
protected void updatePpi()
protected boolean checkGL20()
public com.badlogic.gdx.graphics.GL20 getGL20()
getGL20 in interface com.badlogic.gdx.Graphicspublic void setGL20(com.badlogic.gdx.graphics.GL20 gl20)
setGL20 in interface com.badlogic.gdx.Graphicspublic boolean isGL30Available()
isGL30Available in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.graphics.GL30 getGL30()
getGL30 in interface com.badlogic.gdx.Graphicspublic void setGL30(com.badlogic.gdx.graphics.GL30 gl30)
setGL30 in interface com.badlogic.gdx.Graphicspublic int getHeight()
getHeight in interface com.badlogic.gdx.Graphicspublic int getWidth()
getWidth in interface com.badlogic.gdx.Graphicspublic int getBackBufferWidth()
getBackBufferWidth in interface com.badlogic.gdx.Graphicspublic int getBackBufferHeight()
getBackBufferHeight in interface com.badlogic.gdx.Graphicsprotected void setupGL(javax.microedition.khronos.opengles.GL10 gl)
gl - public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl,
int width,
int height)
onSurfaceChanged in interface android.opengl.GLSurfaceView.Rendererpublic void onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl,
javax.microedition.khronos.egl.EGLConfig config)
onSurfaceCreated in interface android.opengl.GLSurfaceView.Rendererprotected void logConfig(javax.microedition.khronos.egl.EGLConfig config)
public void onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
onDrawFrame in interface android.opengl.GLSurfaceView.Rendererpublic long getFrameId()
getFrameId in interface com.badlogic.gdx.Graphicspublic float getDeltaTime()
getDeltaTime in interface com.badlogic.gdx.Graphicspublic float getRawDeltaTime()
getRawDeltaTime in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.GraphicsType getType()
getType in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.graphics.glutils.GLVersion getGLVersion()
getGLVersion in interface com.badlogic.gdx.Graphicspublic int getFramesPerSecond()
getFramesPerSecond in interface com.badlogic.gdx.Graphicspublic void clearManagedCaches()
protected void logManagedCachesStatus()
public android.view.View getView()
public float getPpiX()
getPpiX in interface com.badlogic.gdx.Graphicspublic float getPpiY()
getPpiY in interface com.badlogic.gdx.Graphicspublic float getPpcX()
getPpcX in interface com.badlogic.gdx.Graphicspublic float getPpcY()
getPpcY in interface com.badlogic.gdx.Graphicspublic float getDensity()
getDensity in interface com.badlogic.gdx.Graphicspublic boolean supportsDisplayModeChange()
supportsDisplayModeChange in interface com.badlogic.gdx.Graphicspublic boolean setFullscreenMode(com.badlogic.gdx.Graphics.DisplayMode displayMode)
setFullscreenMode in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.Monitor getPrimaryMonitor()
getPrimaryMonitor in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.Monitor getMonitor()
getMonitor in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.Monitor[] getMonitors()
getMonitors in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes(com.badlogic.gdx.Graphics.Monitor monitor)
getDisplayModes in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.DisplayMode getDisplayMode(com.badlogic.gdx.Graphics.Monitor monitor)
getDisplayMode in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.DisplayMode[] getDisplayModes()
getDisplayModes in interface com.badlogic.gdx.Graphicsprotected void updateSafeAreaInsets()
public int getSafeInsetLeft()
getSafeInsetLeft in interface com.badlogic.gdx.Graphicspublic int getSafeInsetTop()
getSafeInsetTop in interface com.badlogic.gdx.Graphicspublic int getSafeInsetBottom()
getSafeInsetBottom in interface com.badlogic.gdx.Graphicspublic int getSafeInsetRight()
getSafeInsetRight in interface com.badlogic.gdx.Graphicspublic boolean setWindowedMode(int width,
int height)
setWindowedMode in interface com.badlogic.gdx.Graphicspublic void setTitle(java.lang.String title)
setTitle in interface com.badlogic.gdx.Graphicspublic void setUndecorated(boolean undecorated)
setUndecorated in interface com.badlogic.gdx.Graphicspublic void setResizable(boolean resizable)
setResizable in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.DisplayMode getDisplayMode()
getDisplayMode in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.Graphics.BufferFormat getBufferFormat()
getBufferFormat in interface com.badlogic.gdx.Graphicspublic void setVSync(boolean vsync)
setVSync in interface com.badlogic.gdx.Graphicspublic boolean supportsExtension(java.lang.String extension)
supportsExtension in interface com.badlogic.gdx.Graphicspublic void setContinuousRendering(boolean isContinuous)
setContinuousRendering in interface com.badlogic.gdx.Graphicspublic boolean isContinuousRendering()
isContinuousRendering in interface com.badlogic.gdx.Graphicspublic void requestRendering()
requestRendering in interface com.badlogic.gdx.Graphicspublic boolean isFullscreen()
isFullscreen in interface com.badlogic.gdx.Graphicspublic com.badlogic.gdx.graphics.Cursor newCursor(com.badlogic.gdx.graphics.Pixmap pixmap,
int xHotspot,
int yHotspot)
newCursor in interface com.badlogic.gdx.Graphicspublic void setCursor(com.badlogic.gdx.graphics.Cursor cursor)
setCursor in interface com.badlogic.gdx.Graphicspublic void setSystemCursor(com.badlogic.gdx.graphics.Cursor.SystemCursor systemCursor)
setSystemCursor in interface com.badlogic.gdx.Graphics