+ Metrics: avoid misleadingly iterating all layers of DrawDataBuilder as everything is flattened into Layers[0] at this point.
# Conflicts:
# imgui.cpp
# imgui_internal.h
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.89.8 WIP"
#define IMGUI_VERSION_NUM 18972
#define IMGUI_VERSION_NUM 18973
#define IMGUI_HAS_TABLE
/*
@ -2743,18 +2743,19 @@ struct ImDrawList
// as this is one of the oldest structure exposed by the library! Basically, ImDrawList == CmdList)
structImDrawData
{
boolValid;// Only valid after Render() is called and before the next NewFrame() is called.
intCmdListsCount;// Number of ImDrawList* to render
intTotalIdxCount;// For convenience, sum of all ImDrawList's IdxBuffer.Size
intTotalVtxCount;// For convenience, sum of all ImDrawList's VtxBuffer.Size
ImDrawList**CmdLists;// Array of ImDrawList* to render. The ImDrawList are owned by ImGuiContext and only pointed to from here.
ImVec2DisplayPos;// Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications)
ImVec2DisplaySize;// Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize in most single-viewport applications)
ImVec2FramebufferScale;// Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
boolValid;// Only valid after Render() is called and before the next NewFrame() is called.
intCmdListsCount;// Number of ImDrawList* to render (should always be == CmdLists.size)
intTotalIdxCount;// For convenience, sum of all ImDrawList's IdxBuffer.Size
intTotalVtxCount;// For convenience, sum of all ImDrawList's VtxBuffer.Size
ImVector<ImDrawList*>CmdLists;// Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here.
ImVec2DisplayPos;// Top-left position of the viewport to render (== top-left of the orthogonal projection matrix to use) (== GetMainViewport()->Pos for the main viewport, == (0.0) in most single-viewport applications)
ImVec2DisplaySize;// Size of the viewport to render (== GetMainViewport()->Size for the main viewport, == io.DisplaySize in most single-viewport applications)
ImVec2FramebufferScale;// Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
ImGuiViewport*OwnerViewport;// Viewport carrying the ImDrawData instance, might be of use to the renderer (generally not).
// Functions
ImDrawData(){Clear();}
voidClear(){memset(this,0,sizeof(*this));}// The ImDrawList are owned by ImGuiContext!
IMGUI_APIvoidClear();
IMGUI_APIvoidDeIndexAllBuffers();// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
IMGUI_APIvoidScaleClipRects(constImVec2&fb_scale);// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than Dear ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
// For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
@ -1605,8 +1605,7 @@ struct ImGuiViewportP : public ImGuiViewport
intDrawListsLastFrame[2];// Last frame number the background (0) and foreground (1) draw lists were used
ImDrawList*DrawLists[2];// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor when io.MouseDrawCursor is set and to draw most debug overlays.
ImDrawDataDrawDataP;
ImDrawDataBuilderDrawDataBuilder;
ImDrawDataBuilderDrawDataBuilder;// Temporary data while building final ImDrawData
ImVec2WorkOffsetMin;// Work Area: Offset from Pos to top-left corner of Work Area. Generally (0,0) or (0,+main_menu_bar_height). Work Area is Full Area but without menu-bars/status-bars (so WorkArea always fit inside Pos/Size!)
ImVec2WorkOffsetMax;// Work Area: Offset from Pos+Size to bottom-right corner of Work Area. Generally (0,0) or (0,-status_bar_height).
ImVec2BuildWorkOffsetMin;// Work Area: Offset being built during current frame. Generally >= 0.0f.