Called once a frame. Followed by SetCurrentFont() which sets up the remaining data. FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
| 5498 | // Called once a frame. Followed by SetCurrentFont() which sets up the remaining data. |
| 5499 | // FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal! |
| 5500 | static void SetupDrawListSharedData() |
| 5501 | { |
| 5502 | ImGuiContext& g = *GImGui; |
| 5503 | ImRect virtual_space(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX); |
| 5504 | for (ImGuiViewportP* viewport : g.Viewports) |
| 5505 | virtual_space.Add(viewport->GetMainRect()); |
| 5506 | g.DrawListSharedData.ClipRectFullscreen = virtual_space.ToVec4(); |
| 5507 | g.DrawListSharedData.CurveTessellationTol = g.Style.CurveTessellationTol; |
| 5508 | g.DrawListSharedData.SetCircleTessellationMaxError(g.Style.CircleTessellationMaxError); |
| 5509 | g.DrawListSharedData.InitialFlags = ImDrawListFlags_None; |
| 5510 | if (g.Style.AntiAliasedLines) |
| 5511 | g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedLines; |
| 5512 | if (g.Style.AntiAliasedLinesUseTex && !(g.IO.Fonts->Flags & ImFontAtlasFlags_NoBakedLines)) |
| 5513 | g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedLinesUseTex; |
| 5514 | if (g.Style.AntiAliasedFill) |
| 5515 | g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AntiAliasedFill; |
| 5516 | if (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset) |
| 5517 | g.DrawListSharedData.InitialFlags |= ImDrawListFlags_AllowVtxOffset; |
| 5518 | g.DrawListSharedData.InitialFringeScale = 1.0f; // FIXME-DPI: Change this for some DPI scaling experiments. |
| 5519 | } |
| 5520 | |
| 5521 | void ImGui::NewFrame() |
| 5522 | { |
no test coverage detected