RenderPostTaskRunner クラス
GLFWイベントの処理とウィンドウへの描画を、GLFW/OpenGLコンテキストを所有するレンダースレッドで実行します。
名前空間: FloatSoda.Engine
アセンブリ: FloatSoda.Engine.dll
public class RenderPostTaskRunner : PostTaskRunner, ITaskRunnerobject ← PostTaskRunner ← RenderPostTaskRunner
実装するインターフェイス
Section titled “実装するインターフェイス”継承したメンバー
Section titled “継承したメンバー”PostTaskRunner.Logger, PostTaskRunner.IsRunning, PostTaskRunner.ThreadName, PostTaskRunner.Start(CancellationToken), PostTaskRunner.Stop(), PostTaskRunner.PostTask(Action), PostTaskRunner.DrainPendingTasks(), PostTaskRunner.OnStart(CancellationToken), PostTaskRunner.PreUpdate(), PostTaskRunner.Update(), PostTaskRunner.PostUpdate(), PostTaskRunner.OnStop(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
コンストラクター
Section titled “コンストラクター”RenderPostTaskRunner(string, IFramePacer, ILogger?)
Section titled “RenderPostTaskRunner(string, IFramePacer, ILogger?)”GLFWイベントの処理とウィンドウへの描画を、GLFW/OpenGLコンテキストを所有するレンダースレッドで実行します。
public RenderPostTaskRunner(string threadName, IFramePacer pacer, ILogger? logger = null)パラメーター
Section titled “パラメーター”threadName string
レンダースレッドに設定する名前。
pacer IFramePacer
描画ループの更新間隔を制御するフレーム待機機構。
logger ILogger?
レンダースレッド上の失敗を記録するロガー。記録しない場合は null。
OnStart(CancellationToken)
Section titled “OnStart(CancellationToken)”レンダースレッド上でGLFWを初期化し、ウィンドウとOpenGLリソースを生成できる状態にします。
protected override void OnStart(CancellationToken ct)パラメーター
Section titled “パラメーター”初期化前の停止要求を通知するキャンセルトークン。
OnStop()
Section titled “OnStop()”レンダースレッド上でGLFWを終了します。
protected override void OnStop()GLFWウィンドウとOpenGLリソースは、このメソッドが呼ばれる前に同じレンダースレッド上で解放されている必要があります。
PostRender(IEngineWindow, ILayer)
Section titled “PostRender(IEngineWindow, ILayer)”指定したレイヤーツリーをウィンドウへ反映する処理をレンダースレッドへ追加します。
public void PostRender(IEngineWindow window, ILayer layer)パラメーター
Section titled “パラメーター”window IEngineWindow
レイヤーツリーの反映先となるエンジンウィンドウ。
layer ILayer
反映するレイヤーツリー。
呼び出し元はレンダースレッドである必要はありません。実際の描画はレンダースレッド上で行われます。
PreUpdate()
Section titled “PreUpdate()”レンダースレッドへ投入された描画処理とその他のタスクを、GLFWイベント処理の前に実行します。
protected override void PreUpdate()Update()
Section titled “Update()”レンダースレッド上でGLFWイベントを処理します。
protected override void Update()