public class DistortedTexture
extends java.lang.Object
Create a Texture of arbitrary size and feed some pixels to it via the setTexture() method.
Constructor and Description |
---|
DistortedTexture()
Create an empty texture.
|
DistortedTexture(int type) |
Modifier and Type | Method and Description |
---|---|
long |
getID()
Return unique ID of this Object.
|
void |
markForDeletion()
Mark the underlying OpenGL object for deletion.
|
void |
setColorARGB(int argb)
Paints the Texture with solid color.
|
boolean |
setTexture(Bitmap bmp)
Sets the underlying android.graphics.Bitmap object.
|
public DistortedTexture(int type)
public DistortedTexture()
public boolean setTexture(Bitmap bmp)
You can only recycle() the passed Bitmap once the OpenGL context gets created (i.e. after call to GLSurfaceView.onSurfaceCreated) because only after this point can the Library upload it to the GPU!
bmp
- The android.graphics.Bitmap object to apply effects to and display.public void setColorARGB(int argb)
argb
- The color to paint the Texture with. Example: 0xffff0000 - red.public void markForDeletion()
public long getID()