MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / AddDrawCmd

Method AddDrawCmd

Dependencies/ImGui/src/imgui_draw.cpp:510–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void ImDrawList::AddDrawCmd()
511{
512 ImDrawCmd draw_cmd;
513 draw_cmd.ClipRect = _CmdHeader.ClipRect; // Same as calling ImDrawCmd_HeaderCopy()
514 draw_cmd.TexRef = _CmdHeader.TexRef;
515 draw_cmd.VtxOffset = _CmdHeader.VtxOffset;
516 draw_cmd.IdxOffset = IdxBuffer.Size;
517
518 IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w);
519 CmdBuffer.push_back(draw_cmd);
520}
521
522// Pop trailing draw command (used before merging or presenting to user)
523// Note that this leaves the ImDrawList in a state unfit for further commands, as most code assume that CmdBuffer.Size > 0 && CmdBuffer.back().UserCallback == NULL

Callers 5

MergeMethod · 0.80
SetCurrentChannelMethod · 0.80
RenderTextMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected