mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-29 04:35:49 +03:00
This commit is contained in:
parent
548389359c
commit
6f41d13c7a
2 changed files with 5 additions and 3 deletions
|
|
@ -5954,7 +5954,7 @@ static void FlattenDrawDataIntoSingleLayer(ImDrawDataBuilder* builder)
|
||||||
|
|
||||||
static void InitViewportDrawData(ImGuiViewportP* viewport)
|
static void InitViewportDrawData(ImGuiViewportP* viewport)
|
||||||
{
|
{
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiContext& g = *GImGui;
|
||||||
ImDrawData* draw_data = &viewport->DrawDataP;
|
ImDrawData* draw_data = &viewport->DrawDataP;
|
||||||
|
|
||||||
viewport->DrawDataBuilder.Layers[0] = &draw_data->CmdLists;
|
viewport->DrawDataBuilder.Layers[0] = &draw_data->CmdLists;
|
||||||
|
|
@ -5963,12 +5963,13 @@ static void InitViewportDrawData(ImGuiViewportP* viewport)
|
||||||
viewport->DrawDataBuilder.Layers[1]->resize(0);
|
viewport->DrawDataBuilder.Layers[1]->resize(0);
|
||||||
|
|
||||||
draw_data->Valid = true;
|
draw_data->Valid = true;
|
||||||
|
draw_data->FrameCount = g.FrameCount;
|
||||||
draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
|
draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
|
||||||
draw_data->DisplayPos = viewport->Pos;
|
draw_data->DisplayPos = viewport->Pos;
|
||||||
draw_data->DisplaySize = viewport->Size;
|
draw_data->DisplaySize = viewport->Size;
|
||||||
draw_data->FramebufferScale = io.DisplayFramebufferScale;
|
draw_data->FramebufferScale = g.IO.DisplayFramebufferScale;
|
||||||
draw_data->OwnerViewport = viewport;
|
draw_data->OwnerViewport = viewport;
|
||||||
draw_data->Textures = &ImGui::GetPlatformIO().Textures;
|
draw_data->Textures = &g.PlatformIO.Textures;
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
draw_data->CmdListsCount = 0;
|
draw_data->CmdListsCount = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
1
imgui.h
1
imgui.h
|
|
@ -3493,6 +3493,7 @@ struct ImDrawList
|
||||||
struct ImDrawData
|
struct ImDrawData
|
||||||
{
|
{
|
||||||
bool Valid; // Only valid after Render() is called and before the next NewFrame() is called.
|
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 TotalIdxCount; // For convenience, sum of all ImDrawList's IdxBuffer.Size
|
||||||
int TotalVtxCount; // For convenience, sum of all ImDrawList's VtxBuffer.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.
|
ImVector<ImDrawList*> CmdLists; // Array of ImDrawList* to render. The ImDrawLists are owned by ImGuiContext and only pointed to from here.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue