Skip to content

Commit

Permalink
Fix artifacts when vsync is off.
Browse files Browse the repository at this point in the history
  • Loading branch information
bolrog committed May 27, 2021
1 parent 2143f41 commit 2da06ba
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/d2dx/RenderContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,18 +465,13 @@ void RenderContext::Present()
break;
case RenderContextSyncStrategy::Interval1:
D2DX_CHECK_HR(_swapChain1->Present(1, 0));
/*
ComPtr<IDXGIOutput> output;
_swapChain1->GetContainingOutput(&output);
output->WaitForVBlank();*/

double curTime = TimeEndMs(_timeStart);
_frameTimeMs = curTime - _prevTime;
_prevTime = curTime;
break;
}

double curTime = TimeEndMs(_timeStart);
_frameTimeMs = curTime - _prevTime;
_prevTime = curTime;

if (_deviceContext1)
{
_deviceContext1->DiscardView(_resources->GetFramebufferRtv(RenderContextFramebuffer::Game));
Expand Down

0 comments on commit 2da06ba

Please sign in to comment.