public class Texture2D extends BaseHandle
mEngineHandle, mHandle
Constructor and Description |
---|
Texture2D(long engineHandle) |
Modifier and Type | Method and Description |
---|---|
void |
active(int offset)
Bind the current texture to the specified offset
|
Point |
getSize() |
int |
getTextureId() |
boolean |
init(boolean isOes)
Trigger OpenGL texture generation
|
boolean |
init(int textureid,
int width,
int height,
boolean isOes)
Specify texture, allocate specified texture memory
|
boolean |
initWithBitmap(Bitmap bitmap) |
boolean |
initWithSize(int width,
int height,
boolean isOes)
Allocate specified texture memory
|
boolean |
isOes()
Whether the external texture
|
Bitmap |
readToBitmap() |
java.nio.ByteBuffer |
readToByteBuffer(java.nio.ByteBuffer pixelBuf)
Write texture data to ByteBuffer
|
void |
release() |
boolean |
saveToFile(java.lang.String outPath,
Bitmap.CompressFormat format,
int quality)
write texture data to file
|
boolean |
updateWithBitmap(Bitmap bitmap) |
checkState, finalize, getHandle, isValid, setHandle
public boolean init(boolean isOes)
isOes
- public boolean initWithSize(int width, int height, boolean isOes)
width
- height
- isOes
- public boolean init(int textureid, int width, int height, boolean isOes)
textureid
- width
- height
- isOes
- public boolean isOes()
public boolean initWithBitmap(Bitmap bitmap)
public boolean updateWithBitmap(Bitmap bitmap)
public void active(int offset)
offset
- public Point getSize()
public java.nio.ByteBuffer readToByteBuffer(java.nio.ByteBuffer pixelBuf)
pixelBuf
- public Bitmap readToBitmap()
public boolean saveToFile(java.lang.String outPath, Bitmap.CompressFormat format, int quality)
public int getTextureId()
public void release()
release
in class BaseHandle