Called once a frame. Followed by SetCurrentFont() which sets up the remaining data. FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
| 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! |
| 5654 | static 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 | |
| 5675 | void ImGui::NewFrame() |
| 5676 | { |
no test coverage detected