Mercurial > mm7
diff RenderD3D11.cpp @ 2470:94cf712fc780
for_refactoring
author | Ritor1 |
---|---|
date | Mon, 18 Aug 2014 18:28:53 +0600 |
parents | 1d04e48651d4 |
children | 0683c0a38282 |
line wrap: on
line diff
--- a/RenderD3D11.cpp Mon Aug 18 13:11:39 2014 +0600 +++ b/RenderD3D11.cpp Mon Aug 18 18:28:53 2014 +0600 @@ -231,13 +231,18 @@ unsigned int device_flags = 0;//D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT; #ifndef NODEBUG - device_flags |= D3D11_CREATE_DEVICE_DEBUG /*| D3D11_CREATE_DEVICE_DEBUGGABLE*/; - #endif + device_flags |= 0/*D3D11_CREATE_DEVICE_DEBUG | D3D11_CREATE_DEVICE_DEBUGGABLE*/; + #endif HRESULT (__stdcall *dll_D3D11CreateDeviceAndSwapChain)(IDXGIAdapter* pAdapter, D3D_DRIVER_TYPE DriverType, HMODULE Software, UINT Flags, CONST D3D_FEATURE_LEVEL* pFeatureLevels, UINT FeatureLevels, UINT SDKVersion, CONST DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IDXGISwapChain** ppSwapChain, ID3D11Device** ppDevice, D3D_FEATURE_LEVEL* pFeatureLevel, ID3D11DeviceContext** ppImmediateContext); dll_D3D11CreateDeviceAndSwapChain = (decltype(dll_D3D11CreateDeviceAndSwapChain))GetProcAddress(d3d_lib, "D3D11CreateDeviceAndSwapChain"); - ErrorD3D(dll_D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, device_flags, &requested_feature_level, 1, D3D11_SDK_VERSION, &swapChainDesc, &pSwapChain, &d3dd, &received_feature_level, &d3dc)); + ErrorD3D(dll_D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, device_flags, nullptr, 0, D3D11_SDK_VERSION, &swapChainDesc, &pSwapChain, &d3dd, &received_feature_level, &d3dc)); + if (received_feature_level < D3D_FEATURE_LEVEL_10_0) + { + MessageBoxA(nullptr, "Received Direct3D 9 or lower", "", 0); + __debugbreak(); + } /*if (fullscreen) { extern void ChangeResolution(int new_dith, int new_height, int new_bpp);