Reduced padding + unused storage in ImDrawList (224->192 bytes) + zero-init ImDrawListSplitter and ImDrawList

+ Readme tweak
This commit is contained in:
ocornut
2020-11-04 13:49:16 +01:00
parent 2fa00656a4
commit d6a2f7e95e
3 changed files with 15 additions and 7 deletions

View File

@ -1692,9 +1692,9 @@ struct IMGUI_API ImGuiWindow
ImGuiID NavLastIds[ImGuiNavLayer_COUNT]; // Last known NavId for this window, per layer (0/1)
ImRect NavRectRel[ImGuiNavLayer_COUNT]; // Reference rectangle, in window relative space
bool MemoryCompacted; // Set when window extraneous data have been garbage collected
int MemoryDrawListIdxCapacity; // Backup of last idx/vtx count, so when waking up the window we can preallocate and avoid iterative alloc/copy
int MemoryDrawListVtxCapacity;
bool MemoryCompacted; // Set when window extraneous data have been garbage collected
public:
ImGuiWindow(ImGuiContext* context, const char* name);