ogre
ogre copied to clipboard
DearIMGUI: support for 32-bit indices
Hello, I'd like to ask for a build option which would enable using 32-bit indices with DearIMGUI.
By default DearIMGUI uses 16-bit indices and uses assert() to check the buffer size. Enabling 32-bit indices is a 2-step process:
- The backend must support it. Presently, OGRE is hardcoded to use 16-bit: https://github.com/OGRECave/ogre/blob/v13.6.1/Components/Overlay/src/OgreImGuiOverlay.cpp#L319
- It must be enabled in 'imconfig.h' to ward off the
assert()s: https://github.com/ocornut/imgui/blob/master/imconfig.h#L94-L98
which asserts do you run into with 16bit indices?
you are likely using the ImDrawList API to get there? Can you show some code that triggers the assert?
also, would implementing ImDrawListFlags_AllowVtxOffset help? https://github.com/ocornut/imgui/issues/2591