Release the a number of reserved vertices/indices from the end of the last reservation made with PrimReserve().
| 640 | |
| 641 | // Release the a number of reserved vertices/indices from the end of the last reservation made with PrimReserve(). |
| 642 | void ImDrawList::PrimUnreserve(int idx_count, int vtx_count) |
| 643 | { |
| 644 | IM_ASSERT_PARANOID(idx_count >= 0 && vtx_count >= 0); |
| 645 | |
| 646 | ImDrawCmd* draw_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1]; |
| 647 | draw_cmd->ElemCount -= idx_count; |
| 648 | VtxBuffer.shrink(VtxBuffer.Size - vtx_count); |
| 649 | IdxBuffer.shrink(IdxBuffer.Size - idx_count); |
| 650 | } |
| 651 | |
| 652 | // Fully unrolled with inline call to keep our debug builds decently fast. |
| 653 | void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col) |