public class Texture2D extends BaseHandle
mEngineHandle, mHandle
构造器和说明 |
---|
Texture2D(long engineHandle) |
限定符和类型 | 方法和说明 |
---|---|
void |
active(int offset)
将当前纹理绑定到指定的offset中
|
android.graphics.Point |
getSize()
获取纹理大小
|
int |
getTextureId()
获取纹理ID
|
boolean |
init(boolean isOes)
触发OpenGL纹理生成
|
boolean |
init(int textureid,
int width,
int height,
boolean isOes)
指定纹理,分配指定纹理内存
|
boolean |
initWithBitmap(android.graphics.Bitmap bitmap)
将bitmap数据写入纹理中
|
boolean |
initWithSize(int width,
int height,
boolean isOes)
分配指定纹理内存
|
boolean |
isOes()
是否外部纹理
|
android.graphics.Bitmap |
readToBitmap()
将纹理数据写入Bitmap
|
java.nio.ByteBuffer |
readToByteBuffer(java.nio.ByteBuffer pixelBuf)
将纹理数据写入ByteBuffer
|
void |
release()
释放纹理
|
boolean |
saveToFile(java.lang.String outPath,
android.graphics.Bitmap.CompressFormat format,
int quality)
将纹理数据写入文件
|
boolean |
updateWithBitmap(android.graphics.Bitmap 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(android.graphics.Bitmap bitmap)
bitmap
- public boolean updateWithBitmap(android.graphics.Bitmap bitmap)
bitmap
- public void active(int offset)
offset
- public android.graphics.Point getSize()
public java.nio.ByteBuffer readToByteBuffer(java.nio.ByteBuffer pixelBuf)
pixelBuf
- public android.graphics.Bitmap readToBitmap()
public boolean saveToFile(java.lang.String outPath, android.graphics.Bitmap.CompressFormat format, int quality)
public int getTextureId()
public void release()
release
在类中 BaseHandle