mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-06 10:05:25 +00:00
Fix End Portal and Disable Vsync
This commit is contained in:
@@ -661,6 +661,7 @@ HRESULT InitDevice()
|
||||
sd.SampleDesc.Count = 1;
|
||||
sd.SampleDesc.Quality = 0;
|
||||
sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
|
||||
sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
|
||||
IDXGISwapChain1* pNewSwapChain = nullptr;
|
||||
hr = dxgiFactory->CreateSwapChainForHwnd(g_pd3dDevice, g_hWnd, &sd, nullptr, nullptr, &pNewSwapChain);
|
||||
@@ -732,7 +733,7 @@ void Render()
|
||||
|
||||
g_pImmediateContext->ClearRenderTargetView( g_pRenderTargetView, ClearColor );
|
||||
g_pImmediateContext->Flush();
|
||||
g_pSwapChain->Present( 0, DXGI_PRESENT_DO_NOT_WAIT );
|
||||
g_pSwapChain->Present( 0, DXGI_PRESENT_ALLOW_TEARING );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -838,6 +839,7 @@ static bool ResizeD3D(int newW, int newH)
|
||||
sd.SampleDesc.Count = 1;
|
||||
sd.SampleDesc.Quality = 0;
|
||||
sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
|
||||
sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
|
||||
|
||||
IDXGISwapChain1* pNewSwapChain = nullptr;
|
||||
hr = dxgiFactory->CreateSwapChainForHwnd(g_pd3dDevice, g_hWnd, &sd, nullptr, nullptr, &pNewSwapChain);
|
||||
|
||||
Reference in New Issue
Block a user