newSize.Height, //
SharpDX.DXGI.Format.Unknown, // 現在のフォーマットを維持
SharpDX.DXGI.SwapChainFlags.None );
- //SharpDX.DXGI.SwapChainFlags.AllowModeSwitch );
- // https://msdn.microsoft.com/en-us/library/windows/desktop/bb174579.aspx
- // > You cannot call SetFullscreenState on a swap chain that you created with IDXGIFactory2::CreateSwapChainForComposition.
this.物理画面サイズ = newSize; // 更新
this._スワップチェーンに依存するグラフィックリソースを作成する( d3dDevice );
}
+#if DEBUG
+ public void DCompDebug_CurrentTimeを保存する()
+ {
+ this._Currenttime = this.DCompDevice.FrameStatistics.CurrentTime;
+ }
+ public double DCompDebug_経過時間msを返す()
+ {
+ return 1000.0 * FDK.カウンタ.QPCTimer.生カウント相対値を秒へ変換して返す( this.DCompDevice.FrameStatistics.CurrentTime - this._Currenttime );
+ }
+ public void DCompDebug_16ms以上かかってたら画面をフラッシュする()
+ {
+ if( this.DCompDebug_経過時間msを返す() > 16.6 )
+ {
+ this.D2DDeviceContext.BeginDraw();
+ this.D2DDeviceContext.Clear( Color4.White );
+ this.D2DDeviceContext.EndDraw();
+ }
+ }
+
+ private long _Currenttime = 0;
+#endif
/// <summary>
/// バックバッファに対応するウィンドウのハンドル。
private void _描画処理を行う()
{
var gd = App.グラフィックデバイス;
+ bool vsync = false;
lock( this._進行描画間同期 )
{
}
//----------------
#endregion
-
} );
+
+ vsync = App.システム設定.垂直帰線待ちを行う;
}
#region " (5) スワップチェーンを表示する。"
//----------------
- gd.SwapChain.Present(
- ( App.システム設定.垂直帰線待ちを行う ) ? 1 : 0,
- SharpDX.DXGI.PresentFlags.None );
+ gd.SwapChain.Present( ( vsync ) ? 1 : 0, SharpDX.DXGI.PresentFlags.None );
//----------------
#endregion
}