MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / _PopUnusedDrawCmd

Method _PopUnusedDrawCmd

KBotExt/imgui/imgui_draw.cpp:450–459  ·  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

448// Pop trailing draw command (used before merging or presenting to user)
449// 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
450void ImDrawList::_PopUnusedDrawCmd()
451{
452 while (CmdBuffer.Size > 0)
453 {
454 ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
455 if (curr_cmd->ElemCount != 0 || curr_cmd->UserCallback != NULL)
456 return;// break;
457 CmdBuffer.pop_back();
458 }
459}
460
461void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
462{

Callers 3

RenderMethod · 0.80
MergeMethod · 0.80
AddDrawListMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected