public class FullFrameRect
extends java.lang.Object
Constructor and Description |
---|
FullFrameRect(Texture2dProgram program)
Prepares the object.
|
Modifier and Type | Method and Description |
---|---|
void |
changeProgram(Texture2dProgram program)
Changes the program.
|
int |
createTextureObject()
Creates a texture object suitable for use with drawFrame().
|
void |
drawFrame(int textureId,
float[] texMatrix)
Draws a viewport-filling rect, texturing it with the specified texture object.
|
Texture2dProgram |
getProgram()
Returns the program currently in use.
|
void |
release(boolean doEglCleanup)
Releases resources.
|
public FullFrameRect(Texture2dProgram program)
program
- The program to use. FullFrameRect takes ownership, and will release
the program when no longer needed.public void release(boolean doEglCleanup)
This must be called with the appropriate EGL activity current (i.e. the one that was current when the constructor was called). If we're about to destroy the EGL activity, there's no value in having the caller make it current just to do this cleanup, so you can pass a flag that will tell this function to skip any EGL-activity-specific cleanup.
public Texture2dProgram getProgram()
public void changeProgram(Texture2dProgram program)
The appropriate EGL activity must be current.
public int createTextureObject()
public void drawFrame(int textureId, float[] texMatrix)