diff --git a/examples/11-fontsdf/fontsdf.cpp b/examples/11-fontsdf/fontsdf.cpp index fa470e711..0222c298d 100644 --- a/examples/11-fontsdf/fontsdf.cpp +++ b/examples/11-fontsdf/fontsdf.cpp @@ -129,8 +129,8 @@ class ExampleFontSDF : public entry::AppI , uint16_t(m_height) ); - const int32_t guiPanelWidth = 325; - const int32_t guiPanelHeight = 200; + const float guiPanelWidth = 325.0f; + const float guiPanelHeight = 200.0f; ImGui::SetNextWindowPos(ImVec2(m_width - guiPanelWidth - 10.0f, 10.0f) ); ImGui::Begin("Text Area" diff --git a/examples/13-stencil/stencil.cpp b/examples/13-stencil/stencil.cpp index f6b7646c9..1eb04bdb9 100644 --- a/examples/13-stencil/stencil.cpp +++ b/examples/13-stencil/stencil.cpp @@ -958,7 +958,7 @@ public: uint8_t numLights = (uint8_t)m_numLights; s_uniforms.m_params.m_ambientPass = 1.0f; s_uniforms.m_params.m_lightingPass = 1.0f; - s_uniforms.m_params.m_lightCount = m_numLights; + s_uniforms.m_params.m_lightCount = float(m_numLights); s_uniforms.m_params.m_lightIndex = 0.0f; s_uniforms.m_color[3] = m_reflectionValue; diff --git a/examples/16-shadowmaps/shadowmaps.cpp b/examples/16-shadowmaps/shadowmaps.cpp index 94f7996b1..993c22445 100644 --- a/examples/16-shadowmaps/shadowmaps.cpp +++ b/examples/16-shadowmaps/shadowmaps.cpp @@ -1971,10 +1971,10 @@ class ExampleShadowmaps : public entry::AppI , m_viewState.m_height ); - ImGui::SetNextWindowPos(ImVec2(m_viewState.m_width - 300 - 10, 10) ); + ImGui::SetNextWindowPos(ImVec2(float(m_viewState.m_width) - 300.0f - 10.0f, 10.0f) ); ImGui::Begin("Settings" , NULL - , ImVec2(300, 660) + , ImVec2(300.0f, 660.0f) , ImGuiWindowFlags_AlwaysAutoResize ); @@ -2414,7 +2414,12 @@ if ( ImGui::RadioButton(_name, _var == _val )) _var = _val; BX_CHECK(maxNumSplits >= settings.m_numSplits, "Error! Max num splits."); float splitSlices[maxNumSplits*2]; - splitFrustum(splitSlices, m_settings.m_numSplits, currentSmSettings->m_near, currentSmSettings->m_far, m_settings.m_splitDistribution); + splitFrustum(splitSlices + , uint8_t(m_settings.m_numSplits) + , currentSmSettings->m_near + , currentSmSettings->m_far + , m_settings.m_splitDistribution + ); // Update uniforms. for (uint8_t ii = 0, ff = 1; ii < m_settings.m_numSplits; ++ii, ff+=2) @@ -2808,7 +2813,7 @@ if ( ImGui::RadioButton(_name, _var == _val )) _var = _val; } else //LightType::DirectionalLight == settings.m_lightType) { - drawNum = m_settings.m_numSplits; + drawNum = uint8_t(m_settings.m_numSplits); } for (uint8_t ii = 0; ii < drawNum; ++ii)