// Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc.
// Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc. May trigger for you if you are using PrimXXX functions incorrectly.
// Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices)
// Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices)
// If this assert triggers because you are drawing lots of stuff manually, A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists, B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly.
// If this assert triggers because you are drawing lots of stuff manually, you can:
IM_ASSERT((int64_t)draw_list->_VtxCurrentIdx<=((int64_t)1L<<(sizeof(ImDrawIdx)*8)));// Too many vertices in same ImDrawList. See comment above.
// A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists,
// B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly.
IM_ASSERT((draw_list->_VtxCurrentIdx>>(sizeof(ImDrawIdx)*8))==0);// Too many vertices in same ImDrawList. See comment above.