mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-19 13:32:59 +01:00
Dxgi tearing support (#2601)
* present tearing support * use existing syncInterval variable
This commit is contained in:
@@ -2287,7 +2287,12 @@ namespace bgfx { namespace d3d11
|
||||
if (NULL != m_swapChain
|
||||
&& m_needPresent)
|
||||
{
|
||||
hr = m_swapChain->Present(syncInterval, 0);
|
||||
uint32_t presentFlags = 0;
|
||||
if (!syncInterval && (m_dxgi.tearingSupported()))
|
||||
{
|
||||
presentFlags |= DXGI_PRESENT_ALLOW_TEARING;
|
||||
}
|
||||
hr = m_swapChain->Present(syncInterval, presentFlags);
|
||||
|
||||
m_needPresent = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user