Amerio.Stephane Posted September 20, 2023 Share Posted September 20, 2023 Hi, I'm trying to update ImGui from the provided 1.81 (in c++ thrid party) to the most recent github 1.89.9. But I get this compilation error: 1>...\source\ImGuiImpl.cpp(228,81): error C2664: 'void Unigine::MeshDynamic::addIndicesArray(const int *,int)': cannot convert argument 1 from 'T *const ' to 'const int *' 1> with 1> [ 1> T=ImWchar 1> ] Of course, a simple cast isn't working. How can we fix this? Note: 1.81 integration works fine, but we need to use other imgui extensions that rely on a more recent ImGui API. Thanks! Link to comment
sweetluna Posted September 20, 2023 Share Posted September 20, 2023 Hi, It looks like you replaced imconfig.h too. Originally it defined ImDrawIdx as an int. //---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices. // Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices). // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer. // Read about ImGuiBackendFlags_RendererHasVtxOffset for details. #define ImDrawIdx int Hope this helps! May RenderDoc/Nsight Graphics/Intel GPA bless you Link to comment
Amerio.Stephane Posted September 21, 2023 Author Share Posted September 21, 2023 Duh, of course! Thanks for the clarification! (I think this should go into the doc anyway, along with "don't forget to import the imgui.basemat". Spare us the headaches...) Thanks! Link to comment
silent Posted September 21, 2023 Share Posted September 21, 2023 Yeah, we will add this information into docs soon :) Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts