public class TextureOffscreen
extends java.lang.Object
| Constructor and Description |
|---|
TextureOffscreen(int width,
int height)
コンストラクタ(GL_TEXTURE_2D), デプスバッファ無し
|
TextureOffscreen(int width,
int height,
boolean use_depth_buffer)
コンストラクタ(GL_TEXTURE_2D)
|
TextureOffscreen(int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
コンストラクタ(GL_TEXTURE_2D)
|
TextureOffscreen(int tex_id,
int width,
int height)
既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ, デプスバッファなし
|
TextureOffscreen(int tex_id,
int width,
int height,
boolean use_depth_buffer)
既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ
|
TextureOffscreen(int tex_target,
int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
コンストラクタ
|
TextureOffscreen(int tex_target,
int tex_id,
int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
既存のテクスチャをwrapするためのコンストラクタ
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignTexture(int texture_name,
int width,
int height)
指定したテクスチャをこのオフスクリーンに割り当てる
|
void |
bind()
オフスクリーン描画用のレンダリングバッファに切り替える
Viewportも変更になるので必要であればunbind後にViewportの設定をすること
|
int |
getHeight()
get dimension(height) of this offscreen
|
float[] |
getRawTexMatrix()
テクスチャ座標変換行列を取得(内部配列を直接返すので変更時は要注意)
|
int |
getTexHeight()
get backing texture dimension(height) of this offscreen
|
float[] |
getTexMatrix()
get copy of texture matrix
|
void |
getTexMatrix(float[] matrix,
int offset)
テクスチャ変換行列のコピーを返す
領域チェックしていないのでoffset位置から16個以上確保しておくこと
|
int |
getTexture()
オフスクリーンテクスチャ名を取得
このオフスクリーンへ書き込んだ画像をテクスチャとして使って他の描画を行う場合に使用できる
|
int |
getTexWidth()
get backing texture dimension(width) of this offscreen
|
int |
getWidth()
get dimension(width) of this offscreen
|
void |
loadBitmap(android.graphics.Bitmap bitmap)
Bitmapからテクスチャを読み込む
|
void |
release()
破棄する
|
void |
unbind()
デフォルトのレンダリングバッファに戻す
|
public TextureOffscreen(int width,
int height)
width - height - public TextureOffscreen(int width,
int height,
boolean use_depth_buffer)
width - dimension of offscreen(width)height - dimension of offscreen(height)use_depth_buffer - set true if you use depth buffer. the depth is fixed as 16bitspublic TextureOffscreen(int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
width - height - use_depth_buffer - adjust_power2 - public TextureOffscreen(int tex_target,
int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
tex_target - GL_TEXTURE_2Dwidth - height - use_depth_buffer - adjust_power2 - public TextureOffscreen(int tex_id,
int width,
int height)
tex_id - width - height - public TextureOffscreen(int tex_id,
int width,
int height,
boolean use_depth_buffer)
tex_id - width - height - use_depth_buffer - public TextureOffscreen(int tex_target,
int tex_id,
int width,
int height,
boolean use_depth_buffer,
boolean adjust_power2)
tex_target - GL_TEXTURE_2Dtex_id - width - height - use_depth_buffer - adjust_power2 - public void release()
public void bind()
public void unbind()
public float[] getTexMatrix()
public float[] getRawTexMatrix()
public void getTexMatrix(float[] matrix,
int offset)
matrix - public int getTexture()
public void assignTexture(int texture_name,
int width,
int height)
public void loadBitmap(android.graphics.Bitmap bitmap)
public int getWidth()
public int getHeight()
public int getTexWidth()
public int getTexHeight()