In D3D9, you could set
D3DFMT_UNKNOWN in the presentation parameters and D3D would select the format for you.
However, in D3D10, if I set the swap chain descriptor's
DXGI_FORMAT_UNKNOWN, I get this error:
D3D11 ERROR: ID3D11Device::CreateTexture2D: A Texture2D does not support the following Format (0, UNKNOWN). [ STATE_CREATION ERROR #92: CREATETEXTURE2D_UNSUPPORTEDFORMAT]
By the way, if I'm calling
D3D10CreateDeviceAndSwapChain, why am I getting a D3D11 error? I guess in Windows 8.1 d3d10 is implemented with d3d11 behind the scenes. Strange. Back to the question, I want to have D3D select the back buffer format for me, is it possible?
Edit: If it's not possible to select automatically, where can I find a good rationale to select it myself? The amount of choices is baffling.