This commit is contained in:
omar 2017-07-15 17:11:53 +08:00
parent be7fa76fdd
commit 8261d9ff30
2 changed files with 2 additions and 1 deletions

View File

@ -1154,6 +1154,7 @@ struct ImDrawVert
// You can override the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h // 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 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) // 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; IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
#endif #endif

View File

@ -15,7 +15,7 @@
#include <ctype.h> // toupper, isprint #include <ctype.h> // toupper, isprint
#include <math.h> // sqrtf, powf, cosf, sinf, floorf, ceilf #include <math.h> // sqrtf, powf, cosf, sinf, floorf, ceilf
#include <stdio.h> // vsnprintf, sscanf, printf #include <stdio.h> // vsnprintf, sscanf, printf
#include <stdlib.h> // NULL, malloc, free, qsort, atoi #include <stdlib.h> // NULL, malloc, free, atoi
#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
#include <stddef.h> // intptr_t #include <stddef.h> // intptr_t
#else #else