From dc582c76ee12773caf9db8ea8c5a5468531e57ac Mon Sep 17 00:00:00 2001 From: "m.milanovic@levi9.com" Date: Thu, 18 Sep 2014 15:32:42 +0200 Subject: [PATCH 1/2] Make VS and Mingw x64 builds default to Windows 7 (_WIN32_WINNT=0x601) --- scripts/bgfx.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/bgfx.lua b/scripts/bgfx.lua index 022b4a09a..837a5ea49 100644 --- a/scripts/bgfx.lua +++ b/scripts/bgfx.lua @@ -60,6 +60,11 @@ function bgfxProject(_name, _kind, _defines) BGFX_DIR .. "3rdparty/khronos", } + configuration { "x64", "vs* or mingw" } + defines { + "_WIN32_WINNT=0x601", + } + configuration {} includedirs { From 3e572a9616358eade3fc701f9091c8061f127e75 Mon Sep 17 00:00:00 2001 From: "m.milanovic@levi9.com" Date: Thu, 18 Sep 2014 15:33:09 +0200 Subject: [PATCH 2/2] Fixed DirectX 11 render compile errors --- src/renderer_d3d11.cpp | 9 +++++---- src/renderer_d3d11.h | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index ad8b58b2c..f7ff2f366 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -115,7 +115,7 @@ namespace bgfx D3D11_CULL_BACK, }; - static DXGI_FORMAT s_colorFormat[] = + /*static DXGI_FORMAT s_colorFormat[] = { DXGI_FORMAT_UNKNOWN, // ignored DXGI_FORMAT_R8G8B8A8_UNORM, @@ -124,7 +124,7 @@ namespace bgfx DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R32_FLOAT, - }; + };*/ static const DXGI_FORMAT s_depthFormat[] = { @@ -578,7 +578,7 @@ namespace bgfx if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { ID3D11InfoQueue* infoQueue; - hr = m_device->QueryInterface(__uuidof(ID3D11InfoQueue), (void**)&infoQueue); + hr = m_device->QueryInterface(IID_ID3D11InfoQueue, (void**)&infoQueue); if (SUCCEEDED(hr) ) { @@ -2105,6 +2105,7 @@ namespace bgfx , regIndex , regCount ); + BX_UNUSED(kind); } m_constantBuffer->finish(); @@ -2767,7 +2768,7 @@ namespace bgfx commitShaderConstants(); } } - + BX_UNUSED(programChanged); ID3D11UnorderedAccessView* uav[BGFX_MAX_COMPUTE_BINDINGS] = {}; ID3D11ShaderResourceView* srv[BGFX_MAX_COMPUTE_BINDINGS] = {}; ID3D11SamplerState* sampler[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS] = {}; diff --git a/src/renderer_d3d11.h b/src/renderer_d3d11.h index 9d198b096..85748d0f5 100644 --- a/src/renderer_d3d11.h +++ b/src/renderer_d3d11.h @@ -44,7 +44,7 @@ namespace bgfx Ty* find(uint64_t _id) { - HashMap::iterator it = m_hashMap.find(_id); + typename HashMap::iterator it = m_hashMap.find(_id); if (it != m_hashMap.end() ) { return it->second; @@ -55,7 +55,7 @@ namespace bgfx void invalidate(uint64_t _id) { - HashMap::iterator it = m_hashMap.find(_id); + typename HashMap::iterator it = m_hashMap.find(_id); if (it != m_hashMap.end() ) { DX_RELEASE_WARNONLY(it->second, 0); @@ -65,7 +65,7 @@ namespace bgfx void invalidate() { - for (HashMap::iterator it = m_hashMap.begin(), itEnd = m_hashMap.end(); it != itEnd; ++it) + for (typename HashMap::iterator it = m_hashMap.begin(), itEnd = m_hashMap.end(); it != itEnd; ++it) { DX_CHECK_REFCOUNT(it->second, 1); it->second->Release();