FileDocCategorySizeDatePackage
GLCanvas.javaAPI DocAndroid 5.1 API8617Thu Mar 12 22:22:42 GMT 2015com.android.gallery3d.glrenderer

GLCanvas

public interface GLCanvas

Fields Summary
public static final int
SAVE_FLAG_ALL
public static final int
SAVE_FLAG_ALPHA
public static final int
SAVE_FLAG_MATRIX
Constructors Summary
Methods Summary
public abstract voidbeginRenderTarget(RawTexture texture)

public abstract voidclearBuffer()

public abstract voidclearBuffer(float[] argb)

public abstract voiddeleteBuffer(int bufferId)

public abstract voiddeleteRecycledResources()

public abstract voiddrawLine(float x1, float y1, float x2, float y2, GLPaint paint)

public abstract voiddrawMesh(BasicTexture tex, int x, int y, int xyBuffer, int uvBuffer, int indexBuffer, int indexCount)

public abstract voiddrawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h)

public abstract voiddrawMixed(BasicTexture from, int toColor, float ratio, android.graphics.RectF src, android.graphics.RectF target)

public abstract voiddrawRect(float x1, float y1, float x2, float y2, GLPaint paint)

public abstract voiddrawTexture(BasicTexture texture, int x, int y, int width, int height)

public abstract voiddrawTexture(BasicTexture texture, android.graphics.RectF source, android.graphics.RectF target)

public abstract voiddrawTexture(BasicTexture texture, float[] mTextureTransform, int x, int y, int w, int h)

public abstract voiddumpStatisticsAndClear()

public abstract voidendRenderTarget()

public abstract voidfillRect(float x, float y, float width, float height, int color)

public abstract floatgetAlpha()

public abstract voidgetBounds(android.graphics.Rect bounds, int x, int y, int width, int height)
Gets the bounds given by x, y, width, and height as well as the internal matrix state. There is no special handling for non-90-degree rotations. It only considers the lower-left and upper-right corners as the bounds.

param
bounds The output bounds to write to.
param
x The left side of the input rectangle.
param
y The bottom of the input rectangle.
param
width The width of the input rectangle.
param
height The height of the input rectangle.

public GLIdgetGLId()

public abstract voidinitializeTexture(BasicTexture texture, android.graphics.Bitmap bitmap)
Initializes the texture to a size by calling texImage2D on it.

param
texture The texture to initialize the size.
param
bitmap The bitmap to initialize the bitmap with.

public abstract voidinitializeTextureSize(BasicTexture texture, int format, int type)
Initializes the texture to a size by calling texImage2D on it.

param
texture The texture to initialize the size.
param
format The texture format (e.g. GL_RGBA)
param
type The texture type (e.g. GL_UNSIGNED_BYTE)

public abstract voidmultiplyAlpha(float alpha)

public abstract voidmultiplyMatrix(float[] mMatrix, int offset)

public abstract voidrecoverFromLightCycle()
After LightCycle makes GL calls, this method is called to restore the GL configuration to the one expected by GLCanvas.

public abstract voidrestore()

public abstract voidrotate(float angle, float x, float y, float z)

public abstract voidsave()

public abstract voidsave(int saveFlags)

public abstract voidscale(float sx, float sy, float sz)

public abstract voidsetAlpha(float alpha)

public abstract voidsetSize(int width, int height)

public abstract voidsetTextureParameters(BasicTexture texture)
Sets texture parameters to use GL_CLAMP_TO_EDGE for both GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T. Sets texture parameters to be GL_LINEAR for GL_TEXTURE_MIN_FILTER and GL_TEXTURE_MAG_FILTER. bindTexture() must be called prior to this.

param
texture The texture to set parameters on.

public abstract voidtexSubImage2D(BasicTexture texture, int xOffset, int yOffset, android.graphics.Bitmap bitmap, int format, int type)
Calls glTexSubImage2D to upload a bitmap to the texture.

param
texture The target texture to write to.
param
xOffset Specifies a texel offset in the x direction within the texture array.
param
yOffset Specifies a texel offset in the y direction within the texture array.
param
format The texture format (e.g. GL_RGBA)
param
type The texture type (e.g. GL_UNSIGNED_BYTE)

public abstract voidtranslate(float x, float y, float z)

public abstract voidtranslate(float x, float y)

public abstract booleanunloadTexture(BasicTexture texture)

public abstract intuploadBuffer(java.nio.FloatBuffer buffer)
Generates buffers and uploads the buffer data.

param
buffer The buffer to upload
return
The buffer ID that was generated.

public abstract intuploadBuffer(java.nio.ByteBuffer buffer)
Generates buffers and uploads the element array buffer data.

param
buffer The buffer to upload
return
The buffer ID that was generated.