ogre icon indicating copy to clipboard operation
ogre copied to clipboard

DearIMGUI: support for 32-bit indices

Open ohlidalp opened this issue 2 years ago • 1 comments

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

ohlidalp avatar Feb 05 '23 18:02 ohlidalp

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

paroj avatar Feb 05 '23 19:02 paroj