mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +00:00
Proper frame names on frames graph.
This commit is contained in:
parent
acabdf3c2a
commit
37f42a52fb
@ -675,32 +675,43 @@ void View::DrawFrames()
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto offset = m_worker.GetFrameOffset();
|
||||
if( sel == 0 )
|
||||
if( m_frames->name == 0 )
|
||||
{
|
||||
ImGui::Text( "Tracy initialization" );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
else if( offset == 0 )
|
||||
{
|
||||
ImGui::TextDisabled( "Frame:" );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s", RealToString( sel, true ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
else if( sel == 1 )
|
||||
{
|
||||
ImGui::Text( "Missed frames" );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Time:", TimeToString( m_worker.GetFrameTime( *m_frames, 1 ) ) );
|
||||
const auto offset = m_worker.GetFrameOffset();
|
||||
if( sel == 0 )
|
||||
{
|
||||
ImGui::Text( "Tracy initialization" );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
else if( offset == 0 )
|
||||
{
|
||||
ImGui::TextDisabled( "Frame:" );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s", RealToString( sel, true ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
else if( sel == 1 )
|
||||
{
|
||||
ImGui::Text( "Missed frames" );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Time:", TimeToString( m_worker.GetFrameTime( *m_frames, 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextDisabled( "Frame:" );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s", RealToString( sel + offset - 1, true ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextDisabled( "Frame:" );
|
||||
ImGui::TextDisabled( "%s:", m_worker.GetString( m_frames->name ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s", RealToString( sel + offset - 1, true ) );
|
||||
ImGui::Text( "%s", RealToString( sel, true ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Frame time:", TimeToString( m_worker.GetFrameTime( *m_frames, sel ) ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user