Jump to content

[SOLVED] ImGui 1.89.9 integration


photo

Recommended Posts

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

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!
 

Link to comment

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 changed the title to [SOLVED] ImGui 1.89.9 integration
×
×
  • Create New...