Do I have to flush command queue before calling IDXGISwapChain::Present?
void MyApp::OnPaint() {
//.....
FlushCommandQueue(); // flush the command queue.
m_dxgiSwapChain->Present( 0, 0 );
}
void MyApp::FlushCommandQueue() {
m_CommandQueue->Signal( m_Fence, ++m_CurrentFrame );
m_Fence->SetEventOnCompletion( m_CurrentFrame, m_Fence, m_FenceEvent );
WaitForSignleObject( m_FenceEvent, INFINITE );
}
