mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Render main profiler view in whole window.
This commit is contained in:
parent
df7db3bd2b
commit
b76707ffa1
@ -1,6 +1,6 @@
|
||||
CFLAGS +=
|
||||
CXXFLAGS := $(CFLAGS) -std=c++17
|
||||
DEFINES += -DTRACY_FILESELECTOR -DTRACY_EXTENDED_FONT
|
||||
DEFINES += -DTRACY_FILESELECTOR -DTRACY_EXTENDED_FONT -DTRACY_ROOT_WINDOW
|
||||
INCLUDES := $(shell pkg-config --cflags glfw3) -I../../../imgui -I../../libs/gl3w
|
||||
LIBS := $(shell pkg-config --libs glfw3) -lpthread -ldl
|
||||
PROJECT := Tracy
|
||||
|
@ -48,7 +48,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\libs\glfw\include;..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
@ -73,7 +73,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\libs\glfw\include;..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
|
@ -521,7 +521,27 @@ bool View::DrawImpl()
|
||||
char tmp[2048];
|
||||
sprintf( tmp, "%s###Profiler", m_worker.GetCaptureName().c_str() );
|
||||
ImGui::SetNextWindowSize( ImVec2( 1550, 800 ), ImGuiCond_FirstUseEver );
|
||||
|
||||
#ifdef TRACY_ROOT_WINDOW
|
||||
auto& style = ImGui::GetStyle();
|
||||
const auto wrPrev = style.WindowRounding;
|
||||
const auto wbsPrev = style.WindowBorderSize;
|
||||
const auto wpPrev = style.WindowPadding;
|
||||
style.WindowRounding = 0.f;
|
||||
style.WindowBorderSize = 0.f;
|
||||
style.WindowPadding = ImVec2( 4.f, 4.f );
|
||||
|
||||
ImGui::SetNextWindowPos( ImVec2( 0, 0 ) );
|
||||
ImGui::SetNextWindowSize( ImVec2( m_rootWidth, m_rootHeight ) );
|
||||
ImGui::Begin( tmp, nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoMove );
|
||||
|
||||
style.WindowRounding = wrPrev;
|
||||
style.WindowBorderSize = wbsPrev;
|
||||
style.WindowPadding = wpPrev;
|
||||
#else
|
||||
ImGui::Begin( tmp, keepOpenPtr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBringToFrontOnFocus );
|
||||
#endif
|
||||
|
||||
if( !m_worker.IsDataStatic() )
|
||||
{
|
||||
if( ImGui::Button( m_pause ? MainWindowButtons[0] : MainWindowButtons[1], ImVec2( bw, 0 ) ) ) m_pause = !m_pause;
|
||||
|
Loading…
Reference in New Issue
Block a user