MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / _PopUnusedDrawCmd

Method _PopUnusedDrawCmd

extern/imgui/imgui_draw.cpp:456–465  ·  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

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

Callers 2

SetupViewportDrawDataFunction · 0.80
MergeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected