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
| 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 |
| 456 | void 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 | |
| 467 | void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data) |
| 468 | { |
no outgoing calls
no test coverage detected