D3D11CreateDeviceAndSwapChain() vs IDXGIFactory::CreateSwapChain()

Started by
3 comments, last by Jason Z 10 years, 3 months ago

Which one is better? In frank luna's book, they use a few COM queries, then call IDXGIFactory::CreateSwapChain. But you can do that with a single call of D3D11CreateDeviceAndSwapChain() (also creates the device so that's a plus). So I was wondering, is there a catch with any of this? What can I/can I not do if I initialize my DIrect3D layer using D3D11CreateDeviceAndSwapChain() ?

Advertisement

It looks like in this case you won't be able to check different multisample quality levels, because the method ID3D11Device::CheckMultisampleQualityLevels should be used with already created Device, but before creating SwapChain

Ah! So I won't be able to check for MSAA quality levels beforehand.. Hmm, I guess that since I'm always using 1x MSAA atm, i'll be sticking with D3D11CreateDeviceAndSwapChain(). Thanks!
Do post if you find anything else :D.

I don't know of any limitations. As far as MSAa goes you will typically create a separate MSAA render target texture anyway, so it's not an issue in practice.

The only benefit that I could think of is that you would already have access to the IDXGIFactory in case you wanted to create additional swap chains (for multi-windowed rendering), but that can easily be re-acquired through a few COM calls on the device interface itself. So there really isn't too much difference between the two from a functional perspective.

This topic is closed to new replies.

Advertisement