com.badlogic.gdx.backends.android
Class AndroidGraphics

java.lang.Object
  extended by com.badlogic.gdx.backends.android.AndroidGraphics
All Implemented Interfaces:
android.opengl.GLSurfaceView.Renderer, Graphics
Direct Known Subclasses:
AndroidGraphicsLiveWallpaper

public class AndroidGraphics
extends Object
implements Graphics, android.opengl.GLSurfaceView.Renderer

An implementation of Graphics for Android.

Author:
mzechner

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.badlogic.gdx.Graphics
Graphics.BufferFormat, Graphics.DisplayMode, Graphics.GraphicsType
 
Constructor Summary
AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy)
           
AndroidGraphics(AndroidApplicationBase application, AndroidApplicationConfiguration config, ResolutionStrategy resolutionStrategy, boolean focusableView)
           
 
Method Summary
 void clearManagedCaches()
           
 Graphics.BufferFormat getBufferFormat()
           
 float getDeltaTime()
          
 float getDensity()
           
 Graphics.DisplayMode getDesktopDisplayMode()
           
 Graphics.DisplayMode[] getDisplayModes()
           
 int getFramesPerSecond()
          
 GL20 getGL20()
          
 GL30 getGL30()
           
 int getHeight()
          
 float getPpcX()
           
 float getPpcY()
           
 float getPpiX()
           
 float getPpiY()
           
 float getRawDeltaTime()
           
 Graphics.GraphicsType getType()
          
 android.view.View getView()
           
 int getWidth()
          
 boolean isContinuousRendering()
           
 boolean isFullscreen()
           
 boolean isGL30Available()
           
 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)
           
 void requestRendering()
           
 void setContinuousRendering(boolean isContinuous)
           
 boolean setDisplayMode(Graphics.DisplayMode displayMode)
           
 boolean setDisplayMode(int width, int height, boolean fullscreen)
           
 void setTitle(String title)
           
 void setVSync(boolean vsync)
           
 boolean supportsDisplayModeChange()
           
 boolean supportsExtension(String extension)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndroidGraphics

public AndroidGraphics(AndroidApplicationBase application,
                       AndroidApplicationConfiguration config,
                       ResolutionStrategy resolutionStrategy)

AndroidGraphics

public AndroidGraphics(AndroidApplicationBase application,
                       AndroidApplicationConfiguration config,
                       ResolutionStrategy resolutionStrategy,
                       boolean focusableView)
Method Detail

onPauseGLSurfaceView

public void onPauseGLSurfaceView()

onResumeGLSurfaceView

public void onResumeGLSurfaceView()

getGL20

public GL20 getGL20()

Specified by:
getGL20 in interface Graphics

getHeight

public int getHeight()

Specified by:
getHeight in interface Graphics

getWidth

public int getWidth()

Specified by:
getWidth in interface Graphics

onSurfaceChanged

public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl,
                             int width,
                             int height)
Specified by:
onSurfaceChanged in interface android.opengl.GLSurfaceView.Renderer

onSurfaceCreated

public void onSurfaceCreated(javax.microedition.khronos.opengles.GL10 gl,
                             javax.microedition.khronos.egl.EGLConfig config)
Specified by:
onSurfaceCreated in interface android.opengl.GLSurfaceView.Renderer

onDrawFrame

public void onDrawFrame(javax.microedition.khronos.opengles.GL10 gl)
Specified by:
onDrawFrame in interface android.opengl.GLSurfaceView.Renderer

getDeltaTime

public float getDeltaTime()

Specified by:
getDeltaTime in interface Graphics

getRawDeltaTime

public float getRawDeltaTime()
Specified by:
getRawDeltaTime in interface Graphics

getType

public Graphics.GraphicsType getType()

Specified by:
getType in interface Graphics

getFramesPerSecond

public int getFramesPerSecond()

Specified by:
getFramesPerSecond in interface Graphics

clearManagedCaches

public void clearManagedCaches()

getView

public android.view.View getView()

getPpiX

public float getPpiX()
Specified by:
getPpiX in interface Graphics

getPpiY

public float getPpiY()
Specified by:
getPpiY in interface Graphics

getPpcX

public float getPpcX()
Specified by:
getPpcX in interface Graphics

getPpcY

public float getPpcY()
Specified by:
getPpcY in interface Graphics

getDensity

public float getDensity()
Specified by:
getDensity in interface Graphics

supportsDisplayModeChange

public boolean supportsDisplayModeChange()
Specified by:
supportsDisplayModeChange in interface Graphics

setDisplayMode

public boolean setDisplayMode(Graphics.DisplayMode displayMode)
Specified by:
setDisplayMode in interface Graphics

getDisplayModes

public Graphics.DisplayMode[] getDisplayModes()
Specified by:
getDisplayModes in interface Graphics

setDisplayMode

public boolean setDisplayMode(int width,
                              int height,
                              boolean fullscreen)
Specified by:
setDisplayMode in interface Graphics

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface Graphics

getDesktopDisplayMode

public Graphics.DisplayMode getDesktopDisplayMode()
Specified by:
getDesktopDisplayMode in interface Graphics

getBufferFormat

public Graphics.BufferFormat getBufferFormat()
Specified by:
getBufferFormat in interface Graphics

setVSync

public void setVSync(boolean vsync)
Specified by:
setVSync in interface Graphics

supportsExtension

public boolean supportsExtension(String extension)
Specified by:
supportsExtension in interface Graphics

setContinuousRendering

public void setContinuousRendering(boolean isContinuous)
Specified by:
setContinuousRendering in interface Graphics

isContinuousRendering

public boolean isContinuousRendering()
Specified by:
isContinuousRendering in interface Graphics

requestRendering

public void requestRendering()
Specified by:
requestRendering in interface Graphics

isFullscreen

public boolean isFullscreen()
Specified by:
isFullscreen in interface Graphics

isGL30Available

public boolean isGL30Available()
Specified by:
isGL30Available in interface Graphics

getGL30

public GL30 getGL30()
Specified by:
getGL30 in interface Graphics


Copyright © 2014. All Rights Reserved.