Using imgui dll built with "#define ImDrawIdx unsigned int" in imconfig.h makes garbage output
Hi,
After setting up ImPlot to work with ImGui.Net, I wanted to use "Heatmap" Demo on ImPlot Demo page, but it triggers an assert which says "Too many vertices in ImDrawList using 16-bit indices. Read the comment above" in imgui.cpp. "Comment above" suggests uncommenting "#define ImDrawIdx unsigned int" in imconfig.h file. But doing so makes the output of SampleProgram garbage. I tried to increase the sizeinbytes values of BufferDescription class in CreateDeviceResources function in ImGuiController class with no luck.
Any suggestions? Thanks.
P.S. I checked the C++ version of ImPlot in this Demo which has the same problem. Uncommenting "#define ImDrawIdx unsigned int" solves that. (win32+opengl3 backend)
cimgui should be regenerated first with ImDrawIdx being unsigned int.
After that I am not sure if additional steps in ImGui.NET are needed. (apart from generation)
You have to update the well known types dictionary in TypeInfo.cs
cimgui should be regenerated first with ImDrawIdx being unsigned int.
After that I am not sure if additional steps in ImGui.NET are needed. (apart from generation)
Thank you. Yes. I think Imgui.Net only needs cimgui.dll. I double-checked and made sure that cimgui.dll and cimplot.dll were generated using "#define ImDrawIdx unsigned int".
You have to update the well known types dictionary in TypeInfo.cs
Thanks. I changed { "ImDrawIdx", "ushort" }, to { "ImDrawIdx", "uint" }, in TypeInfo.cs, Re-Ran CodeGenerator, over-wrote (over-writed?) Generated files back in ImGui.Net "Generated" folder Then Rebuilt SampleProgram.
Still No luck.

Similar results here in plain C++ after recompiling with the ImDrawIdx change.