mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
DrawCmd: Added ForbidMerging boolean
This commit is contained in:
parent
1897248bda
commit
9b2647d112
3 changed files with 4 additions and 2 deletions
|
|
@ -5777,7 +5777,8 @@ static void ImGui::RenderDimmedBackgroundBehindWindow(ImGuiWindow* window, ImU32
|
|||
ImDrawList* draw_list = window->RootWindow->DrawList;
|
||||
if (draw_list->CmdBuffer.Size == 0)
|
||||
draw_list->AddDrawCmd();
|
||||
draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false); // FIXME: Need to stricty ensure ImDrawCmd are not merged (ElemCount==6 checks below will verify that)
|
||||
draw_list->CmdBuffer.back().ForbidMerging = true; // Strictly ensure ImDrawCmd are not merged
|
||||
draw_list->PushClipRect(viewport_rect.Min - ImVec2(1, 1), viewport_rect.Max + ImVec2(1, 1), false);
|
||||
draw_list->AddRectFilled(viewport_rect.Min, viewport_rect.Max, col);
|
||||
ImDrawCmd cmd = draw_list->CmdBuffer.back();
|
||||
IM_ASSERT(cmd.ElemCount == 6);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue