From f3d5b63b541d8048568f134403838213c77177e4 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Sat, 23 Jul 2022 02:34:10 +0200 Subject: [PATCH] flag use-ImDrawIdx32 --- dear-imgui.hs | 2 +- dear-implot.cabal | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dear-imgui.hs b/dear-imgui.hs index 4c9b76a..8d332a4 160000 --- a/dear-imgui.hs +++ b/dear-imgui.hs @@ -1 +1 @@ -Subproject commit 4c9b76aed5d009d0d263c82d76b3075524a3fbf8 +Subproject commit 8d332a49ea551973805678303128091d1007efd7 diff --git a/dear-implot.cabal b/dear-implot.cabal index b07a583..8dba684 100644 --- a/dear-implot.cabal +++ b/dear-implot.cabal @@ -18,6 +18,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 + library exposed-modules: DearImGui.Raw.Plot @@ -61,9 +72,15 @@ library include-dirs: implot dear-imgui.hs/imgui + if flag(use-wchar32) cxx-options: -DIMGUI_USE_WCHAR32 cpp-options: -DIMGUI_USE_WCHAR32 + + if flag(use-ImDrawIdx32) + cxx-options: "-DImDrawIdx=unsigned int" + cpp-options: "-DImDrawIdx=unsigned int" + build-depends: base , StateVar , containers