From 6ae4afa0f4d81984518e9bc3eaf80faf2d9c1b39 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 6 Jun 2019 22:43:39 +0200 Subject: [PATCH] Display frame images also on frame time graph. --- server/TracyView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a424f226..ff154660 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1269,6 +1269,16 @@ void View::DrawFrames() } } TextFocused( "Time from start of program:", TimeToString( m_worker.GetFrameBegin( *m_frames, sel ) - m_worker.GetTimeBegin() ) ); + auto fi = m_worker.GetFrameImage( *m_frames, sel ); + if( fi ) + { + if( fi != m_frameTexturePtr ) + { + UpdateTexture( m_frameTexture, fi->ptr, fi->w, fi->h ); + } + ImGui::Separator(); + ImGui::Image( m_frameTexture, ImVec2( fi->w, fi->h ), ImVec2( 0, 1 ), ImVec2( 1, 0 ) ); + } ImGui::EndTooltip(); if( ImGui::IsMouseClicked( 0 ) )