Commit 83418ac3 authored by chili's avatar chili
Browse files

fix flickering bug

parent 9927aeba
...@@ -76,9 +76,10 @@ void Box::SpawnControlWindow( int id,Graphics& gfx ) noexcept ...@@ -76,9 +76,10 @@ void Box::SpawnControlWindow( int id,Graphics& gfx ) noexcept
bool dirty = false; bool dirty = false;
if( ImGui::Begin( ("Box "s + std::to_string( id )).c_str() ) ) if( ImGui::Begin( ("Box "s + std::to_string( id )).c_str() ) )
{ {
dirty = dirty || ImGui::ColorEdit3( "Material Color",&materialConstants.color.x ); const auto cd = ImGui::ColorEdit3( "Material Color",&materialConstants.color.x );
dirty = dirty || ImGui::SliderFloat( "Specular Intensity",&materialConstants.specularIntensity,0.05f,4.0f,"%.2f",2 ); const auto sid = ImGui::SliderFloat( "Specular Intensity",&materialConstants.specularIntensity,0.05f,4.0f,"%.2f",2 );
dirty = dirty || ImGui::SliderFloat( "Specular Power",&materialConstants.specularPower,1.0f,200.0f,"%.2f",2 ); const auto spd = ImGui::SliderFloat( "Specular Power",&materialConstants.specularPower,1.0f,200.0f,"%.2f",2 );
dirty = cd || sid || spd;
} }
ImGui::End(); ImGui::End();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment