Has anyone ever had issues with screen tearing under DX11?
- I'm pretty sure I'm buffering properly as per the example programs.
- I present with Present(1,0);
- It is properly limiting my frame rate to 60FPS.
Here is the code I'm using to initialize the swap chain.....
memset(&l_desc,0,sizeof(DXGI_SWAP_CHAIN_DESC));
l_desc.BufferCount = 1;
l_desc.BufferDesc.Width = in_width;
l_desc.BufferDesc.Height = in_height;
l_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
l_desc.BufferDesc.RefreshRate.Numerator = 60;
l_desc.BufferDesc.RefreshRate.Denominator = 1;
l_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
l_desc.OutputWindow = *(HWND *)in_handle;
l_desc.SampleDesc.Count = 1;
l_desc.SampleDesc.Quality = 0;
l_desc.Windowed = TRUE;
l_result = l_d3d->QueryInterface(__uuidof(IDXGIDevice),(void **)&l_device);
if(SUCCEEDED(l_result))
{
l_result = l_device->GetParent(__uuidof(IDXGIAdapter),(void **)&l_adapter);
if(SUCCEEDED(l_result))
{
l_result = l_adapter->GetParent(__uuidof(IDXGIFactory),(void **)&l_factory);
if(SUCCEEDED(l_result))
{
l_result = l_factory->CreateSwapChain(l_d3d,&l_desc,&m_chain);
l_factory->Release();
if(FAILED(l_result))
{
MessageBox(NULL,"Couldn't create a swap chain on the device!","Error!",MB_OK | MB_ICONINFORMATION);
return false;
}
}
l_adapter->Release();
}
l_device->Release();
}
l_result = m_chain->GetBuffer(0,__uuidof(ID3D11Texture2D),(LPVOID *)&l_texture2D);
Any ideas as to why I'm still getting horrible tearing? Thanks in advance!