on a side note, I manually wrote the above. I didn't include the style information because I don't think that's relevant.
I had to manually write it because the "Copy to clipboard" button failed.
Details:
within imgui_draw.cpp there is an IM_ASSERT checking if (sizeof(ImDrawIdx) == 2) IM_ASSERT(draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above");.
the issue is that the assert is not triggering. according to my understanding, it should.
as a test, if I put IM_ASSERT( ImGui::GetIO().MetricsRenderVertices < (1<<16) && "too many vertices" ); before the other assert, it triggers.
to my understanding, there is a "concerning" comment within imgui.h. this comment is at the definition of _VtxCurrentIdx. it says: // [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0..
if it gets reset to zero, how is the IM_ASSERT ever supposed to understand that the vertex count has exceeed the limit?
I only noticed that the vertex count was exceeding the limit because when it does, I see none of imgui and my application window only displays the stuff I'm rendering. I'm assuming that imgui is completely breaking past this limit (UB).
Version/Branch of Dear ImGui:
Version 1.91.4, Branch: docking
Back-ends:
sokol_imgui.h (although I think this is N/A)
Compiler, OS:
Windows 11 + MSVC
Full config/build information:
on a side note, I manually wrote the above. I didn't include the style information because I don't think that's relevant.
I had to manually write it because the "Copy to clipboard" button failed.
Details:
within
imgui_draw.cpp
there is an IM_ASSERT checkingif (sizeof(ImDrawIdx) == 2) IM_ASSERT(draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above");
.the issue is that the assert is not triggering. according to my understanding, it should.
as a test, if I put
IM_ASSERT( ImGui::GetIO().MetricsRenderVertices < (1<<16) && "too many vertices" );
before the other assert, it triggers.to my understanding, there is a "concerning" comment within imgui.h. this comment is at the definition of
_VtxCurrentIdx
. it says:// [Internal] generally == VtxBuffer.Size unless we are past 64K vertices, in which case this gets reset to 0.
.if it gets reset to zero, how is the IM_ASSERT ever supposed to understand that the vertex count has exceeed the limit?
I only noticed that the vertex count was exceeding the limit because when it does, I see none of imgui and my application window only displays the stuff I'm rendering. I'm assuming that imgui is completely breaking past this limit (UB).
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response