Skip to content

Commit

Permalink
added flag_ImDrawIdx (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Dresselhaus <[email protected]>
  • Loading branch information
Drezil and Drezil authored Jul 23, 2022
1 parent cf87988 commit 06eb052
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dear-imgui.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 06eb052

Please sign in to comment.