First off, according to dxdiag, I have DirectX version 11. However, I'm going through a tutorial (rastertek.com) and while initializing my directx device (specifically the D3D11CreateDeviceAndSwapChain function), it returns an error (therefore the program gets stopped). On the above site, there are both tutorials for D11 and D10, and, as previously stated, the D11 version won't work, however the D10 version does work. So I don't get why even though I have DX version 11, the program fails.
Here's where the program returns an error:
result = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, &featureLevel, 1,
D3D11_SDK_VERSION, &swapChainDesc, &m_swapChain, &m_device, NULL, &m_deviceContext);
You can see where all of these variables come from at http://www.rastertek.com/dx11tut03.html, it's a little bit more than 1/3 down the page.
I have seen other problems with this function in other forums (and what they do doesn't help me), as well as msdn which says if the first parameter is non-null, set the second parameter to D3D_DRIVER_TYPE_UNKNOWN, which still doesn't make a difference.
Any enlightenment on this problem is greatly appreciated! Thanks!!