Skip to content

Commit 06eb052

Browse files
authored
added flag_ImDrawIdx (#151)
Co-authored-by: Stefan Dresselhaus <[email protected]>
1 parent cf87988 commit 06eb052

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

dear-imgui.cabal

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ flag use-wchar32
126126
manual:
127127
True
128128

129+
flag use-ImDrawIdx32
130+
description:
131+
Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
132+
Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
133+
Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
134+
Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
135+
default:
136+
True
137+
manual:
138+
True
139+
129140
common common
130141
build-depends:
131142
base
@@ -181,6 +192,10 @@ library
181192
cxx-options: -DIMGUI_USE_WCHAR32
182193
cpp-options: -DIMGUI_USE_WCHAR32
183194

195+
if flag(use-ImDrawIdx32)
196+
cxx-options: "-DImDrawIdx=unsigned int"
197+
cpp-options: "-DImDrawIdx=unsigned int"
198+
184199
if flag(opengl2)
185200
exposed-modules:
186201
DearImGui.OpenGL2

0 commit comments

Comments
 (0)