mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-23 09:23:16 +00:00
This commit is contained in:
@@ -5954,7 +5954,7 @@ static void FlattenDrawDataIntoSingleLayer(ImDrawDataBuilder* builder)
|
||||
|
||||
static void InitViewportDrawData(ImGuiViewportP* viewport)
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImDrawData* draw_data = &viewport->DrawDataP;
|
||||
|
||||
viewport->DrawDataBuilder.Layers[0] = &draw_data->CmdLists;
|
||||
@@ -5963,12 +5963,13 @@ static void InitViewportDrawData(ImGuiViewportP* viewport)
|
||||
viewport->DrawDataBuilder.Layers[1]->resize(0);
|
||||
|
||||
draw_data->Valid = true;
|
||||
draw_data->FrameCount = g.FrameCount;
|
||||
draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
|
||||
draw_data->DisplayPos = viewport->Pos;
|
||||
draw_data->DisplaySize = viewport->Size;
|
||||
draw_data->FramebufferScale = io.DisplayFramebufferScale;
|
||||
draw_data->FramebufferScale = g.IO.DisplayFramebufferScale;
|
||||
draw_data->OwnerViewport = viewport;
|
||||
draw_data->Textures = &ImGui::GetPlatformIO().Textures;
|
||||
draw_data->Textures = &g.PlatformIO.Textures;
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
draw_data->CmdListsCount = 0;
|
||||
#endif
|
||||
|
||||
1
imgui.h
1
imgui.h
@@ -3493,6 +3493,7 @@ struct ImDrawList
|
||||
struct ImDrawData
|
||||
{
|
||||
bool Valid; // Only valid after Render() is called and before the next NewFrame() is called.
|
||||
int FrameCount; // Frame counter of the emitter context. For debugging purpose.
|
||||
int TotalIdxCount; // For convenience, sum of all ImDrawList's IdxBuffer.Size
|
||||
int TotalVtxCount; // 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.
|
||||
|
||||
Reference in New Issue
Block a user