From 025521462fce1f30165c0acb1a7892645785d4ed Mon Sep 17 00:00:00 2001 From: MichalPelka Date: Tue, 24 Nov 2026 01:45:31 +0100 Subject: [PATCH] Change ImDrawIdx to 64 bits Signed-off-by: MichalPelka --- cmake/raylib.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/raylib.cmake b/cmake/raylib.cmake index 4ad0fe2f3..2f46fb3dc 100644 --- a/cmake/raylib.cmake +++ b/cmake/raylib.cmake @@ -48,6 +48,10 @@ add_library(imgui_raylib STATIC ${IMGUI_RAYLIB_DIR}/imgui_demo.cpp ) target_include_directories(imgui_raylib PUBLIC ${IMGUI_RAYLIB_DIR}) +# 32-bit indices: rlImGui ignores ImDrawCmd::VtxOffset, so with 16-bit indices a +# draw list over 65535 vertices (e.g. ImPlot lines of a long IMU log) wraps +# around and renders garbage. Same setting as the legacy `imgui` target. +target_compile_definitions(imgui_raylib PUBLIC ImDrawIdx=unsigned\ int) # NOTE: deliberately NOT defining IMGUI_DISABLE_OBSOLETE_FUNCTIONS (unlike # mandeye-colors) -- core's WITH_GUI=1 sources (manual_pose_graph_loop_closure.cpp # etc, shared unchanged with the legacy GLUT app) call a few of ImGui's