From 021dd853b9c40fa3721e2e99b43266a39cf6bdeb Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 18 Jun 2018 01:08:56 +0200 Subject: [PATCH] Differentiate Vulkan/OpenGL in options menu. --- server/TracyView.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c50cc38d..3fe31967 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3204,20 +3204,28 @@ void View::DrawOptions() const auto tw = ImGui::GetFontSize(); ImGui::Begin( "Options", &m_showOptions, ImGuiWindowFlags_AlwaysAutoResize ); - auto sz = m_worker.GetGpuData().size(); - if( sz > 0 ) + const auto& gpuData = m_worker.GetGpuData(); + if( !gpuData.empty() ) { ImGui::Checkbox( "Draw GPU zones", &m_drawGpuZones ); const auto expand = ImGui::TreeNode( "GPU zones" ); ImGui::SameLine(); - ImGui::TextDisabled( "(%zu)", sz ); + ImGui::TextDisabled( "(%zu)", gpuData.size() ); if( expand ) { - for( size_t i=0; ithread == 0; char buf[1024]; - sprintf( buf, "GPU context %zu", i ); - ImGui::Checkbox( buf, &Visible( m_worker.GetGpuData()[i] ) ); + if( isVulkan ) + { + sprintf( buf, "Vulkan context %zu", i ); + } + else + { + sprintf( buf, "OpenGL context %zu", i ); + } + ImGui::Checkbox( buf, &Visible( gpuData[i] ) ); } ImGui::TreePop(); }