MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / _PopUnusedDrawCmd

Method _PopUnusedDrawCmd

ImGUI GLFW Tutorial/imgui/imgui_draw.cpp:465–472  ·  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

463// Pop trailing draw command (used before merging or presenting to user)
464// 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
465void ImDrawList::_PopUnusedDrawCmd()
466{
467 if (CmdBuffer.Size == 0)
468 return;
469 ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
470 if (curr_cmd->ElemCount == 0 && curr_cmd->UserCallback == NULL)
471 CmdBuffer.pop_back();
472}
473
474void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
475{

Callers 2

AddDrawListToDrawDataFunction · 0.45
MergeMethod · 0.45

Calls 1

pop_backMethod · 0.45

Tested by

no test coverage detected