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

Method _PopUnusedDrawCmd

tutorials/common/imgui/imgui_draw.cpp:449–456  ·  view source on GitHub ↗

Pop trailing draw command (used before merging or presenting to user) 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

Source from the content-addressed store, hash-verified

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
449void ImDrawList::_PopUnusedDrawCmd()
450{
451 if (CmdBuffer.Size == 0)
452 return;
453 ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
454 if (curr_cmd->ElemCount == 0 && curr_cmd->UserCallback == NULL)
455 CmdBuffer.pop_back();
456}
457
458void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
459{

Callers 2

SetupViewportDrawDataFunction · 0.80
MergeMethod · 0.80

Calls 1

pop_backMethod · 0.45

Tested by

no test coverage detected