mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
ImDrawList: Small refactor to create empty command when beginning the frame, allowing to simplify some functions.
+ Missing clearing two fields in ClearFreeMemory() (was hamrless)
This commit is contained in:
@ -3777,11 +3777,11 @@ void ImGui::NewFrame()
|
||||
if (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset)
|
||||
g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AllowVtxOffset;
|
||||
|
||||
g.BackgroundDrawList.Clear();
|
||||
g.BackgroundDrawList.ResetForNewFrame();
|
||||
g.BackgroundDrawList.PushTextureID(g.IO.Fonts->TexID);
|
||||
g.BackgroundDrawList.PushClipRectFullScreen();
|
||||
|
||||
g.ForegroundDrawList.Clear();
|
||||
g.ForegroundDrawList.ResetForNewFrame();
|
||||
g.ForegroundDrawList.PushTextureID(g.IO.Fonts->TexID);
|
||||
g.ForegroundDrawList.PushClipRectFullScreen();
|
||||
|
||||
@ -5860,7 +5860,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
// DRAWING
|
||||
|
||||
// Setup draw list and outer clipping rectangle
|
||||
window->DrawList->Clear();
|
||||
window->DrawList->ResetForNewFrame();
|
||||
window->DrawList->PushTextureID(g.Font->ContainerAtlas->TexID);
|
||||
PushClipRect(host_rect.Min, host_rect.Max, false);
|
||||
|
||||
|
Reference in New Issue
Block a user