Version/Branch of Dear ImGui:
Version: 1.86
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: Via imgui-rs, using imgui-glow-renderer
My Issue/Question:
As per imgui-rs/imgui-rs#331 (comment)
Displaying a long (1000 lines with 100 characters per line) string in TextWrapped triggers this assertion:
hello_world: ./third-party/imgui-master/imgui/imgui.cpp:4364: void AddDrawListToDrawData(ImVector<ImDrawList*>*, ImDrawList*): Assertion `draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above"' failed.
This is with a backend that has VfxOffset support - I think all the text is being added in a single DrawCmd thus cannot use the VfxOffset
Screenshots/Video

Standalone, minimal, complete and verifiable example:
Following can be put in imgui-examples/examples/something.rs in https://github.com/imgui-rs/imgui-rs/ and run via cargo run --example something - but should be pretty trivial to convert into C++!
use imgui::*;
mod support;
fn main() {
let system = support::init(file!());
let mut text = String::new();
for _row in 0..1_000 {
for _char in 0..100 {
text += "a";
}
text += "\n";
}
system.main_loop(move |_, ui| {
ui.window("Hello world")
.size([300.0, 110.0], Condition::FirstUseEver)
.build(|| {
ui.child_window("Hm").build(||{
ui.text_wrapped(&text);
});
});
});
}
Version/Branch of Dear ImGui:
Version: 1.86
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: Via imgui-rs, using
imgui-glow-rendererMy Issue/Question:
As per imgui-rs/imgui-rs#331 (comment)
Displaying a long (1000 lines with 100 characters per line) string in
TextWrappedtriggers this assertion:This is with a backend that has
VfxOffsetsupport - I think all the text is being added in a singleDrawCmdthus cannot use theVfxOffsetScreenshots/Video
Standalone, minimal, complete and verifiable example:
Following can be put in
imgui-examples/examples/something.rsin https://github.com/imgui-rs/imgui-rs/ and run viacargo run --example something- but should be pretty trivial to convert into C++!