Display durations in profiler list
This commit is contained in:
parent
5306ce4535
commit
93308ac578
1 changed files with 7 additions and 3 deletions
10
profiling.cc
10
profiling.cc
|
@ -123,7 +123,7 @@ void T_Profiler::makeUI( )
|
|||
ImGuiSetCond_Once );
|
||||
ImGui::Begin( "Profiler" );
|
||||
|
||||
ImGui::BeginChild( "left" , ImVec2( 150 , 0 ) , true );
|
||||
ImGui::BeginChild( "left" , ImVec2( 180 , 0 ) , true );
|
||||
float angle( 0 );
|
||||
for ( auto i = 0u ; i < n ; i ++ ) {
|
||||
if ( displayed_.size( ) == i ) {
|
||||
|
@ -134,8 +134,12 @@ void T_Profiler::makeUI( )
|
|||
ImGui::ColorConvertHSVtoRGB( angle / 360. , .5 , 1 ,
|
||||
color.x , color.y , color.z );
|
||||
ImGui::PushStyleColor( ImGuiCol_Text , color );
|
||||
ImGui::Checkbox( sections_[ i ].c_str( ) ,
|
||||
(bool*) &displayed_[ i ] );
|
||||
|
||||
std::ostringstream str;
|
||||
str << sections_[ i ] << " ("
|
||||
<< int( round( secDurations_[ i ] ) )
|
||||
<< "ms)";
|
||||
ImGui::Checkbox( str.str( ).c_str( ) , (bool*) &displayed_[ i ] );
|
||||
ImGui::PopStyleColor( );
|
||||
}
|
||||
ImGui::EndChild( );
|
||||
|
|
Loading…
Reference in a new issue