public interface GLCanvas
Modifier and Type | Field and Description |
---|---|
static int |
SAVE_FLAG_ALL |
static int |
SAVE_FLAG_ALPHA |
static int |
SAVE_FLAG_MATRIX |
Modifier and Type | Method and Description |
---|---|
void |
beginRenderTarget(RawTexture texture) |
void |
clearBuffer() |
void |
clearBuffer(float[] argb) |
void |
deleteBuffer(int bufferId) |
void |
deleteRecycledResources() |
void |
drawLine(float x1,
float y1,
float x2,
float y2,
GLPaint paint) |
void |
drawMesh(BasicTexture tex,
int x,
int y,
int xyBuffer,
int uvBuffer,
int indexBuffer,
int indexCount) |
void |
drawMixed(BasicTexture from,
int toColor,
float ratio,
int x,
int y,
int w,
int h) |
void |
drawMixed(BasicTexture from,
int toColor,
float ratio,
RectF src,
RectF target) |
void |
drawRect(float x1,
float y1,
float x2,
float y2,
GLPaint paint) |
void |
drawTexture(BasicTexture texture,
float[] mTextureTransform,
int x,
int y,
int w,
int h) |
void |
drawTexture(BasicTexture texture,
int x,
int y,
int width,
int height) |
void |
drawTexture(BasicTexture texture,
RectF source,
RectF target) |
void |
dumpStatisticsAndClear() |
void |
endRenderTarget() |
void |
fillRect(float x,
float y,
float width,
float height,
int color) |
float |
getAlpha() |
void |
getBounds(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.
|
GLId |
getGLId() |
void |
initializeTexture(BasicTexture texture,
Bitmap bitmap)
Initializes the texture to a size by calling texImage2D on it.
|
void |
initializeTextureSize(BasicTexture texture,
int format,
int type)
Initializes the texture to a size by calling texImage2D on it.
|
void |
multiplyAlpha(float alpha) |
void |
multiplyMatrix(float[] mMatrix,
int offset) |
void |
recoverFromLightCycle()
After LightCycle makes GL calls, this method is called to restore the GL
configuration to the one expected by GLCanvas.
|
void |
restore() |
void |
rotate(float angle,
float x,
float y,
float z) |
void |
save() |
void |
save(int saveFlags) |
void |
scale(float sx,
float sy,
float sz) |
void |
setAlpha(float alpha) |
void |
setSize(int width,
int height) |
void |
setTextureParameters(BasicTexture texture)
Sets texture parameters to use GL_CLAMP_TO_EDGE for both
GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T.
|
void |
texSubImage2D(BasicTexture texture,
int xOffset,
int yOffset,
Bitmap bitmap,
int format,
int type)
Calls glTexSubImage2D to upload a bitmap to the texture.
|
void |
translate(float x,
float y) |
void |
translate(float x,
float y,
float z) |
boolean |
unloadTexture(BasicTexture texture) |
int |
uploadBuffer(ByteBuffer buffer)
Generates buffers and uploads the element array buffer data.
|
int |
uploadBuffer(FloatBuffer buffer)
Generates buffers and uploads the buffer data.
|
static final int SAVE_FLAG_ALL
static final int SAVE_FLAG_ALPHA
static final int SAVE_FLAG_MATRIX
GLId getGLId()
void setSize(int width, int height)
void clearBuffer()
void clearBuffer(float[] argb)
void setAlpha(float alpha)
float getAlpha()
void multiplyAlpha(float alpha)
void translate(float x, float y, float z)
void translate(float x, float y)
void scale(float sx, float sy, float sz)
void rotate(float angle, float x, float y, float z)
void multiplyMatrix(float[] mMatrix, int offset)
void save()
void save(int saveFlags)
void restore()
void drawLine(float x1, float y1, float x2, float y2, GLPaint paint)
void drawRect(float x1, float y1, float x2, float y2, GLPaint paint)
void fillRect(float x, float y, float width, float height, int color)
void drawTexture(BasicTexture texture, int x, int y, int width, int height)
void drawMesh(BasicTexture tex, int x, int y, int xyBuffer, int uvBuffer, int indexBuffer, int indexCount)
void drawTexture(BasicTexture texture, RectF source, RectF target)
void drawTexture(BasicTexture texture, float[] mTextureTransform, int x, int y, int w, int h)
void drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h)
void drawMixed(BasicTexture from, int toColor, float ratio, RectF src, RectF target)
boolean unloadTexture(BasicTexture texture)
void deleteBuffer(int bufferId)
void deleteRecycledResources()
void dumpStatisticsAndClear()
void beginRenderTarget(RawTexture texture)
void endRenderTarget()
void setTextureParameters(BasicTexture texture)
texture
- The texture to set parameters on.void initializeTextureSize(BasicTexture texture, int format, int type)
texture
- The texture to initialize the size.format
- The texture format (e.g. GL_RGBA)type
- The texture type (e.g. GL_UNSIGNED_BYTE)void initializeTexture(BasicTexture texture, Bitmap bitmap)
texture
- The texture to initialize the size.bitmap
- The bitmap to initialize the bitmap with.void texSubImage2D(BasicTexture texture, int xOffset, int yOffset, Bitmap bitmap, int format, int type)
texture
- The target texture to write to.xOffset
- Specifies a texel offset in the x direction within the
texture array.yOffset
- Specifies a texel offset in the y direction within the
texture array.format
- The texture format (e.g. GL_RGBA)type
- The texture type (e.g. GL_UNSIGNED_BYTE)int uploadBuffer(FloatBuffer buffer)
buffer
- The buffer to uploadint uploadBuffer(ByteBuffer buffer)
buffer
- The buffer to uploadvoid recoverFromLightCycle()
void getBounds(Rect bounds, int x, int y, int width, int height)
bounds
- The output bounds to write to.x
- The left side of the input rectangle.y
- The bottom of the input rectangle.width
- The width of the input rectangle.height
- The height of the input rectangle.