Enable flip presentation mode and tearing in D3D11
This commit is contained in:
@@ -265,6 +265,19 @@ bool GPUDeviceDX11::Init()
|
||||
return true;
|
||||
}
|
||||
UpdateOutputs(adapter);
|
||||
{
|
||||
ComPtr<IDXGIFactory5> factory5;
|
||||
_factoryDXGI->QueryInterface(IID_PPV_ARGS(&factory5));
|
||||
if (factory5)
|
||||
{
|
||||
BOOL allowTearing;
|
||||
if (SUCCEEDED(factory5->CheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING, &allowTearing, sizeof(allowTearing))) && allowTearing)
|
||||
{
|
||||
AllowTearing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get flags and device type base on current configuration
|
||||
uint32 flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
|
||||
Reference in New Issue
Block a user