MCPcopy Create free account
hub / github.com/RenderKit/embree / PrimUnreserve

Method PrimUnreserve

tutorials/common/imgui/imgui_draw.cpp:642–650  ·  view source on GitHub ↗

Release the a number of reserved vertices/indices from the end of the last reservation made with PrimReserve().

Source from the content-addressed store, hash-verified

640
641// Release the a number of reserved vertices/indices from the end of the last reservation made with PrimReserve().
642void 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.
653void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col)

Callers

nothing calls this directly

Calls 1

shrinkMethod · 0.80

Tested by

no test coverage detected