public abstract class GLLoopStateManager extends GLProcessingManager
修飾子とタイプ | クラスと説明 |
---|---|
static class |
GLLoopStateManager.LoopState |
修飾子とタイプ | フィールドと説明 |
---|---|
protected GLLoopStateManager.LoopState |
loopState
現在の描画ステート
|
protected WeakReference<Object> |
owner
このオブジェクトを管理しているオーナー
weak refが切れた時点でdestroyと同じ扱いとなる |
context, device, eglManager
修飾子 | コンストラクタと説明 |
---|---|
protected |
GLLoopStateManager(android.content.Context context,
IEGLManager eglManager) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
dispose()
廃棄処理を行う
|
GLLoopStateManager.LoopState |
getLoopState()
現在のレンダリング状態を取得する
|
boolean |
hasOwner()
生存期間を統一するためのオーナーオブジェクト
|
void |
initializetWindowDevice(Object windowSurface,
IEGLContextGroup contextGroup)
画面に反映可能なEGLDeviceを生成する
|
boolean |
isOwnerDestroyed()
オーナークラスが死んでいたらtrue
|
boolean |
isProcessingDestroy() |
boolean |
isProcessingPaused() |
boolean |
isProcessingRunning() |
protected void |
onBackgroundProcessing()
バックグラウンド処理を行う
|
protected abstract void |
onLoopFinish()
処理ループの終了を行わせる
|
protected abstract void |
onLoopFrame()
処理ループの1フレーム処理を行わせる
|
protected abstract void |
onLoopInitialize()
処理の初期化を行わせる
|
protected abstract void |
onLoopPaused()
処理の一時停止を行う
|
protected abstract void |
onLoopRequestRendering()
再描画のリクエストがあった
|
protected abstract void |
onLoopResume()
処理の復帰を行う
|
protected abstract void |
onLoopSurfaceSizeChanged(int oldWidth,
int oldHeight,
int newWidth,
int newHeight)
処理中にサーフェイスサイズが変更になったら呼び出される
|
void |
onPause()
処理の休止を行う
|
protected void |
onReceivedMessage(JointMessage message)
メッセージキューを受信した際のハンドリングを行う
|
void |
onResume()
処理のレジュームを行う
|
void |
post(JointMessage message)
GLスレッドへデータを投げる
|
void |
post(JointMessage message,
MessageHandlingListener listener)
GLスレッドへデータを送信し、終了時ハンドリングを行う
|
void |
post(Runnable runner)
GLスレッドで実行を行わせる
|
void |
setOwner(Object owner)
所有者となるオブジェクトを指定する
|
void |
start()
新規にThreadを作成して描画を開始する。
|
void |
stop()
処理ループを速やかに停止する
|
protected void |
stopSelfFromBackground()
自身のスレッドを停止させる
|
protected boolean |
waitSurfaceCreated()
サーフェイスの生成待ちを行う
|
void |
waitVsync()
垂直同期待ちを行う。
|
disposeSelfFromBackground, getAssets, getDevice, getEglManager, getThreadName, initializeOffscreenDevice, initializeOffscreenDevice, join
protected WeakReference<Object> owner
protected GLLoopStateManager.LoopState loopState
protected GLLoopStateManager(android.content.Context context, IEGLManager eglManager)
public void onPause()
public void onResume()
public GLLoopStateManager.LoopState getLoopState()
public boolean isProcessingPaused()
public boolean isProcessingDestroy()
public boolean isProcessingRunning()
public void setOwner(Object owner)
owner
- public boolean hasOwner()
public boolean isOwnerDestroyed()
public void post(Runnable runner)
runner
- public void post(JointMessage message)
message
- public void post(JointMessage message, MessageHandlingListener listener)
message
- listener
- public void start()
GLProcessingManager
start
クラス内 GLProcessingManager
public void dispose()
GLProcessingManager
dispose
クラス内 GLProcessingManager
protected void stopSelfFromBackground()
public void stop()
protected boolean waitSurfaceCreated()
waitSurfaceCreated
クラス内 GLProcessingManager
protected void onBackgroundProcessing()
protected abstract void onLoopInitialize()
protected abstract void onLoopSurfaceSizeChanged(int oldWidth, int oldHeight, int newWidth, int newHeight)
oldWidth
- oldHeight
- newWidth
- newHeight
- protected abstract void onLoopPaused()
protected abstract void onLoopResume()
protected abstract void onLoopRequestRendering()
protected abstract void onLoopFrame()
protected abstract void onLoopFinish()
protected void onReceivedMessage(JointMessage message)
message
- public void initializetWindowDevice(Object windowSurface, IEGLContextGroup contextGroup)
GLProcessingManager
initializetWindowDevice
クラス内 GLProcessingManager
windowSurface
- 描画対象ウィンドウサーフェイスcontextGroup
- EGLContext共有グループpublic void waitVsync()