From 06eb052cc5c58b5fc78e11af166ba0ee105b7d41 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Sat, 23 Jul 2022 14:42:13 +0200 Subject: [PATCH] added flag_ImDrawIdx (#151) Co-authored-by: Stefan Dresselhaus --- dear-imgui.cabal | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dear-imgui.cabal b/dear-imgui.cabal index 64c0dc3..03c4747 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -126,6 +126,17 @@ flag use-wchar32 manual: True +flag use-ImDrawIdx32 + description: + 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. + default: + True + manual: + True + common common build-depends: base @@ -181,6 +192,10 @@ library cxx-options: -DIMGUI_USE_WCHAR32 cpp-options: -DIMGUI_USE_WCHAR32 + if flag(use-ImDrawIdx32) + cxx-options: "-DImDrawIdx=unsigned int" + cpp-options: "-DImDrawIdx=unsigned int" + if flag(opengl2) exposed-modules: DearImGui.OpenGL2