I am currently reading Frank Luna's Introduction to 3D Game Programming with DirectX 11 and have just reached the portion where I am loading my first shader.
After linking to the proper libraries to be able to compile shaders, I was forced to switch to VS 2010 toolset so my app did not try to use Windows 8.1 libraries (which include DirectX so it conflicted with my June SDK directory).
I got everything to compile just fine now, however my D3D11CreateDevice function call is now storing D3D_FEATURE_LEVEL_9_3 as my highest supported feature level. It did not do this before. I confirmed on my dxdiag.exe that my system can support 11. I've also confirmed this in the NVidia control panel, where it states DirectX Runtime version as 11_0.
From what I've been reading from other people who have been having similar problems is that their primary video adapter was the default adapter. However, I only have one adapter so my GTX 670 must be my primary adapter, right?
My Environment: Visual Studio 2013 (using VS 2010 toolset) Video Card: GEFORCE GTX 670M (dx11 capable) ASUS G75V NOTEBOOK Windows 7 64-bit
Regardless, here is my call to check to check the feature level.
// Create Direct3D Device
HRESULT hr = D3D11CreateDevice(
0,
D3D_DRIVER_TYPE_HARDWARE,
0,
createDeviceFlags,
0, 0,
D3D11_SDK_VERSION,
&m_d3dDevice,
&featureLevel,
&m_d3dImmediateContext);
if (FAILED(hr)) {
throw Error("Direct3D Device Creation Failed!");
}
// Check feature level
if (featureLevel != D3D_FEATURE_LEVEL_11_0) {
throw Error("Direct3D Feature Level 11 not supported!");
}
Any input as to what the heck is going on will be greatly appreciated. Direct3D is a fairly new world to me so please go easy.