-
public class TextureOffscreenテクスチャへOpenGL|ESで描画するためのオフスクリーン描画クラス テクスチャをカラーバッファとしてFBOに割り当てる
-
-
Constructor Summary
Constructors Constructor Description TextureOffscreen(int width, int height)コンストラクタ(GL_TEXTURE_2D), デプスバッファ無しテクスチャユニットはGL_TEXTURE0 TextureOffscreen(int tex_unit, int width, int height)コンストラクタ(GL_TEXTURE_2D), デプスバッファ無しテクスチャユニットはGL_TEXTURE0 TextureOffscreen(int width, int height, boolean use_depth_buffer)コンストラクタ(GL_TEXTURE_2D)テクスチャユニットはGL_TEXTURE0 TextureOffscreen(int tex_unit, int width, int height, boolean use_depth_buffer)既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタテクスチャユニットはGL_TEXTURE0 TextureOffscreen(int width, int height, boolean use_depth_buffer, boolean adjust_power2)コンストラクタ(GL_TEXTURE_2D)テクスチャユニットはGL_TEXTURE0 TextureOffscreen(int tex_unit, int width, int height, boolean use_depth_buffer, boolean adjust_power2)コンストラクタ(GL_TEXTURE_2D) TextureOffscreen(int tex_unit, int tex_id, int width, int height)既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ, デプスバッファなし TextureOffscreen(int tex_unit, int tex_id, int width, int height, boolean use_depth_buffer)既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ TextureOffscreen(int tex_target, int tex_unit, int tex_id, int width, int height, boolean use_depth_buffer, boolean adjust_power2)既存のテクスチャをwrapするためのコンストラクタ
-
Method Summary
Modifier and Type Method Description voidrelease()破棄する voidbind()オフスクリーン描画用のレンダリングバッファに切り替えるViewportも変更になるので必要であればunbind後にViewportの設定をすること voidunbind()デフォルトのレンダリングバッファに戻す Array<float>getTexMatrix()get copy of texture matrix Array<float>getRawTexMatrix()テクスチャ座標変換行列を取得(内部配列を直接返すので変更時は要注意) voidgetTexMatrix(Array<float> matrix, int offset)テクスチャ変換行列のコピーを返す領域チェックしていないのでoffset位置から16個以上確保しておくこと intgetTexture()オフスクリーンテクスチャ名を取得このオフスクリーンへ書き込んだ画像をテクスチャとして使って他の描画を行う場合に使用できる voidassignTexture(int texture_name, int width, int height)指定したテクスチャをこのオフスクリーンに割り当てる voidloadBitmap(Bitmap bitmap)Bitmapからテクスチャを読み込む intgetWidth()get dimension(width) of this offscreen intgetHeight()get dimension(height) of this offscreen intgetTexWidth()get backing texture dimension(width) of this offscreen intgetTexHeight()get backing texture dimension(height) of this offscreen intgetTexTarget()intgetTexUnit()-
-
Constructor Detail
-
TextureOffscreen
TextureOffscreen(int width, int height)
コンストラクタ(GL_TEXTURE_2D), デプスバッファ無しテクスチャユニットはGL_TEXTURE0
-
TextureOffscreen
TextureOffscreen(int tex_unit, int width, int height)
コンストラクタ(GL_TEXTURE_2D), デプスバッファ無しテクスチャユニットはGL_TEXTURE0
-
TextureOffscreen
TextureOffscreen(int width, int height, boolean use_depth_buffer)
コンストラクタ(GL_TEXTURE_2D)テクスチャユニットはGL_TEXTURE0- Parameters:
width- dimension of offscreen(width)height- dimension of offscreen(height)use_depth_buffer- set true if you use depth buffer.
-
TextureOffscreen
TextureOffscreen(int tex_unit, int width, int height, boolean use_depth_buffer)
既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタテクスチャユニットはGL_TEXTURE0
-
TextureOffscreen
TextureOffscreen(int width, int height, boolean use_depth_buffer, boolean adjust_power2)
コンストラクタ(GL_TEXTURE_2D)テクスチャユニットはGL_TEXTURE0
-
TextureOffscreen
TextureOffscreen(int tex_unit, int width, int height, boolean use_depth_buffer, boolean adjust_power2)
コンストラクタ(GL_TEXTURE_2D)
-
TextureOffscreen
TextureOffscreen(int tex_unit, int tex_id, int width, int height)
既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ, デプスバッファなし
-
TextureOffscreen
TextureOffscreen(int tex_unit, int tex_id, int width, int height, boolean use_depth_buffer)
既存のテクスチャ(GL_TEXTURE_2D)をwrapするためのコンストラクタ
-
TextureOffscreen
TextureOffscreen(int tex_target, int tex_unit, int tex_id, int width, int height, boolean use_depth_buffer, boolean adjust_power2)
既存のテクスチャをwrapするためのコンストラクタ- Parameters:
tex_target- GL_TEXTURE_2D
-
-
Method Detail
-
release
void release()
破棄する
-
bind
void bind()
オフスクリーン描画用のレンダリングバッファに切り替えるViewportも変更になるので必要であればunbind後にViewportの設定をすること
-
unbind
void unbind()
デフォルトのレンダリングバッファに戻す
-
getTexMatrix
Array<float> getTexMatrix()
get copy of texture matrix
-
getRawTexMatrix
Array<float> getRawTexMatrix()
テクスチャ座標変換行列を取得(内部配列を直接返すので変更時は要注意)
-
getTexMatrix
void getTexMatrix(Array<float> matrix, int offset)
テクスチャ変換行列のコピーを返す領域チェックしていないのでoffset位置から16個以上確保しておくこと
-
getTexture
int getTexture()
オフスクリーンテクスチャ名を取得このオフスクリーンへ書き込んだ画像をテクスチャとして使って他の描画を行う場合に使用できる
-
assignTexture
void assignTexture(int texture_name, int width, int height)
指定したテクスチャをこのオフスクリーンに割り当てる
-
loadBitmap
void loadBitmap(Bitmap bitmap)
Bitmapからテクスチャを読み込む
-
getWidth
int getWidth()
get dimension(width) of this offscreen
-
getHeight
int getHeight()
get dimension(height) of this offscreen
-
getTexWidth
int getTexWidth()
get backing texture dimension(width) of this offscreen
-
getTexHeight
int getTexHeight()
get backing texture dimension(height) of this offscreen
-
getTexTarget
int getTexTarget()
-
getTexUnit
int getTexUnit()
-
-
-
-