var gd = ApplicationForm.グラフィックデバイス;
- // 全面を黒で塗りつぶすだけのサンプル。
- gd.D2DDeviceContext.BeginDraw();
- gd.D2DDeviceContext.Clear( Color4.Black );
- gd.D2DDeviceContext.EndDraw();
+ gd.D3DDeviceを取得する( ( d3dDevice ) => {
+
+ // アニメーションを進行する。
+ gd.Animation.進行する();
+
+ // 現在のUIツリーを描画する。
+ gd.UIFramework.Render( gd );
+
+ // 全面を黒で塗りつぶすだけのサンプル。
+ gd.D2DDeviceContext.BeginDraw();
+ gd.D2DDeviceContext.Clear( Color4.Black );
+ gd.D2DDeviceContext.EndDraw();
+
+ } );
gd.SwapChain.Present( 1, SharpDX.DXGI.PresentFlags.None );
public void Dispose()
{
+ this.Clear();
+ }
+
+ public void Clear()
+ {
this.Root?.Dispose();
this.Root = null;
}
public FDK.カウンタ.アニメーション管理 Animation
=> this._Animation;
+ public FDK.UI.Framework UIFramework
+ => this._UIFramework;
+
/// <summary>
/// IMFDXGIDeviceManager で取得している場合には、Direct3DDevice を返す。
/// 取得していない場合には、null を返す。
private SharpDX.Direct3D11.DeviceDebug _D3DDeviceDebug = null;
private SharpDX.Mathematics.Interop.RawViewportF[] _D3DViewPort = new SharpDX.Mathematics.Interop.RawViewportF[ 1 ];
private FDK.カウンタ.アニメーション管理 _Animation = null;
+ private FDK.UI.Framework _UIFramework = null;
//----------------
#endregion
#region " グラフィックリソース(2) スワップチェーンに依存するもの "
} );
this._Animation = new カウンタ.アニメーション管理();
+
+ this._UIFramework = new UI.Framework();
}
private void _スワップチェーンに依存しないグラフィックリソースを解放する()
{
+ FDKUtilities.解放する( ref this._UIFramework );
FDKUtilities.解放する( ref this._Animation );
テクスチャ.全インスタンスで共有するリソースを解放する();
protected set;
}
- public static FDK.UI.Framework UIフレームワーク
- {
- get;
- protected set;
- } = null;
-
#endregion
App.最後に取得したビュアーメッセージ = null;
App.ビュアー用ノード = null;
- App.UIフレームワーク = new FDK.UI.Framework();
-
#region " メインフォームを初期化する。"
//----------------
this.Text = $"{Application.ProductName} {Application.ProductVersion}";
//----------------
#endregion
- App.UIフレームワーク.Render( gd );
+ gd.UIFramework.Render( gd );
#region " (3) ステージの状態をチェックし、遷移処理を行う。(必要に応じてビュアーメッセージキューの処理も行う。)"
//----------------
{
using( Log.Block( FDKUtilities.現在のメソッド名 ) )
{
- App.UIフレームワーク.Dispose();
-
if( App.ステージ管理.現在のステージ?.活性化している ?? false )
App.ステージ管理.現在のステージ?.非活性化する( App.グラフィックデバイス );