From 8261d9ff30b0ef409c2ebdc324b2f5234518e5e4 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 15 Jul 2017 17:11:53 +0800 Subject: [PATCH] Comments (#1172, #1231) --- imgui.h | 1 + imgui_demo.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.h b/imgui.h index f786f5d65..deb532930 100644 --- a/imgui.h +++ b/imgui.h @@ -1154,6 +1154,7 @@ struct ImDrawVert // You can override the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h // The code expect ImVec2 pos (8 bytes), ImVec2 uv (8 bytes), ImU32 col (4 bytes), but you can re-order them or add other fields as needed to simplify integration in your engine. // The type has to be described within the macro (you can either declare the struct or use a typedef) +// NOTE: IMGUI DOESN'T CLEAR THE STRUCTURE AND DOESN'T CALL A CONSTRUCTOR. IF YOU ADD EXTRA FIELDS (SUCH AS A 'Z' COORDINATES) YOU WILL NEED TO CLEAR THE FIELD DURING RENDER OR TO IGNORE IT. IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT; #endif diff --git a/imgui_demo.cpp b/imgui_demo.cpp index b198cd174..0dbed6141 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -15,7 +15,7 @@ #include // toupper, isprint #include // sqrtf, powf, cosf, sinf, floorf, ceilf #include // vsnprintf, sscanf, printf -#include // NULL, malloc, free, qsort, atoi +#include // NULL, malloc, free, atoi #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #include // intptr_t #else