MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / SetupDrawListSharedData

Function SetupDrawListSharedData

Dependencies/ImGui/src/imgui.cpp:5654–5673  ·  view source on GitHub ↗

Called once a frame. Followed by SetCurrentFont() which sets up the remaining data. FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!

Source from the content-addressed store, hash-verified

5652// Called once a frame. Followed by SetCurrentFont() which sets up the remaining data.
5653// FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
5654static void SetupDrawListSharedData()
5655{
5656 ImGuiContext& g = *GImGui;
5657 ImRect virtual_space(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
5658 for (ImGuiViewportP* viewport : g.Viewports)
5659 virtual_space.Add(viewport->GetMainRect());
5660 g.DrawListSharedData.ClipRectFullscreen = virtual_space.ToVec4();
5661 g.DrawListSharedData.CurveTessellationTol = g.Style.CurveTessellationTol;
5662 g.DrawListSharedData.SetCircleTessellationMaxError(g.Style.CircleTessellationMaxError);
5663 g.DrawListSharedData.InitialFlags = ImDrawListFlags_None;
5664 if (g.Style.AntiAliasedLines)
5665 g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedLines;
5666 if (g.Style.AntiAliasedLinesUseTex && !(g.IO.Fonts->Flags & ImFontAtlasFlags_NoBakedLines))
5667 g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedLinesUseTex;
5668 if (g.Style.AntiAliasedFill)
5669 g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedFill;
5670 if (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset)
5671 g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AllowVtxOffset;
5672 g.DrawListSharedData.InitialFringeScale = 1.0f; // FIXME-DPI: Change this for some DPI scaling experiments.
5673}
5674
5675void ImGui::NewFrame()
5676{

Callers 1

NewFrameMethod · 0.85

Calls 3

GetMainRectMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected