MCPcopy Create free account
hub / github.com/RenderKit/embree / AddDrawCmd

Method AddDrawCmd

tutorials/common/imgui/imgui_draw.cpp:435–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void ImDrawList::AddDrawCmd()
436{
437 ImDrawCmd draw_cmd;
438 draw_cmd.ClipRect = _CmdHeader.ClipRect; // Same as calling ImDrawCmd_HeaderCopy()
439 draw_cmd.TextureId = _CmdHeader.TextureId;
440 draw_cmd.VtxOffset = _CmdHeader.VtxOffset;
441 draw_cmd.IdxOffset = IdxBuffer.Size;
442
443 IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w);
444 CmdBuffer.push_back(draw_cmd);
445}
446
447// Pop trailing draw command (used before merging or presenting to user)
448// 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 4

MergeMethod · 0.80
SetCurrentChannelMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected