diff --git a/examples/18-ibl/ibl.cpp b/examples/18-ibl/ibl.cpp index 624af624..59cba7a1 100644 --- a/examples/18-ibl/ibl.cpp +++ b/examples/18-ibl/ibl.cpp @@ -734,6 +734,7 @@ int _main_(int _argc, char** _argv) // Submit view 0. bgfx::setTexture(0, s_texCube, lightProbes[currentLightProbe].m_tex); + bgfx::setTexture(1, s_texCubeIrr, lightProbes[currentLightProbe].m_texIrr); bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE); screenSpaceQuad( (float)width, (float)height, true); uniforms.submit(); diff --git a/examples/28-wireframe/wireframe.cpp b/examples/28-wireframe/wireframe.cpp index bb64b23d..5bfe91db 100644 --- a/examples/28-wireframe/wireframe.cpp +++ b/examples/28-wireframe/wireframe.cpp @@ -459,7 +459,7 @@ class Wireframe : public entry::AppI last = now; const double freq = double(bx::getHPFrequency() ); const double toMs = 1000.0/freq; - const double deltaTimeSec = double(frameTime)/freq; + const float deltaTimeSec = float(double(frameTime)/freq); // Use m_debug font to print information about this example. bgfx::dbgTextClear(); @@ -472,7 +472,7 @@ class Wireframe : public entry::AppI bgfx::setViewClear(0, BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH, 0x303030ff, 1.0f, 0); const bool mouseOverGui = imguiMouseOverArea(); - m_mouse.update(m_mouseState.m_mx, m_mouseState.m_my, m_mouseState.m_mz, m_width, m_height); + m_mouse.update(float(m_mouseState.m_mx), float(m_mouseState.m_my), m_mouseState.m_mz, m_width, m_height); if (!mouseOverGui) { if (m_mouseState.m_buttons[entry::MouseButton::Left]) @@ -497,7 +497,7 @@ class Wireframe : public entry::AppI bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f); bgfx::setViewTransform(0, view, proj); - m_uniforms.m_drawEdges = (DrawMode::WireframeShaded == m_drawMode) ? 1.0f : 0.0; + m_uniforms.m_drawEdges = (DrawMode::WireframeShaded == m_drawMode) ? 1.0f : 0.0f; m_uniforms.submit(); if (DrawMode::Wireframe == m_drawMode) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index bfe4c0ad..8ca1bd86 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -3717,7 +3717,8 @@ namespace bgfx { BGFX_CHECK_HANDLE_INVALID_OK("submit", m_programHandle, _program); BGFX_CHECK_HANDLE_INVALID_OK("submit", m_occlusionQueryHandle, _occlusionQuery); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) + && !_preserveState) { m_uniformSet.clear(); } @@ -3739,7 +3740,8 @@ namespace bgfx { BGFX_CHECK_HANDLE_INVALID_OK("submit", m_programHandle, _handle); BGFX_CHECK_HANDLE("submit", m_vertexBufferHandle, _indirectHandle); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) + && !_preserveState) { m_uniformSet.clear(); } diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 8f9cd0ea..350369b1 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -791,13 +791,16 @@ namespace bgfx { namespace d3d11 } #endif // USE_D3D11_DYNAMIC_LIB - HRESULT hr = S_OK; - IDXGIFactory* factory = NULL; + HRESULT hr; + IDXGIFactory* factory; #if BX_PLATFORM_WINRT // WinRT requires the IDXGIFactory2 interface, which isn't supported on older platforms hr = CreateDXGIFactory1(__uuidof(IDXGIFactory2), (void**)&factory); #elif BX_PLATFORM_WINDOWS hr = CreateDXGIFactory(IID_IDXGIFactory, (void**)&factory); +#else + hr = S_OK; + factory = NULL; #endif // BX_PLATFORM_* BX_WARN(SUCCEEDED(hr), "Unable to create DXGI factory."); if (FAILED(hr) )