| 9532 | //----------------------------------------------------------------------------- |
| 9533 | |
| 9534 | static void ImGui::UpdateTexturesNewFrame() |
| 9535 | { |
| 9536 | // Cannot update every atlases based on atlas's FrameCount < g.FrameCount, because an atlas may be shared by multiple contexts with different frame count. |
| 9537 | ImGuiContext& g = *GImGui; |
| 9538 | const bool has_textures = (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) != 0; |
| 9539 | for (ImFontAtlas* atlas : g.FontAtlases) |
| 9540 | { |
| 9541 | if (atlas->OwnerContext == &g) |
| 9542 | { |
| 9543 | ImFontAtlasUpdateNewFrame(atlas, g.FrameCount, has_textures); |
| 9544 | } |
| 9545 | else |
| 9546 | { |
| 9547 | // (1) If you manage font atlases yourself, e.g. create a ImFontAtlas yourself you need to call ImFontAtlasUpdateNewFrame() on it. |
| 9548 | // Otherwise, calling ImGui::CreateContext() without parameter will create an atlas owned by the context. |
| 9549 | // (2) If you have multiple font atlases, make sure the 'atlas->RendererHasTextures' as specified in the ImFontAtlasUpdateNewFrame() call matches for that. |
| 9550 | // (3) If you have multiple imgui contexts, they also need to have a matching value for ImGuiBackendFlags_RendererHasTextures. |
| 9551 | IM_ASSERT(atlas->Builder != NULL && atlas->Builder->FrameCount != -1); |
| 9552 | IM_ASSERT(atlas->RendererHasTextures == has_textures); |
| 9553 | } |
| 9554 | } |
| 9555 | } |
| 9556 | |
| 9557 | // Build a single texture list |
| 9558 | static void ImGui::UpdateTexturesEndFrame() |
nothing calls this directly
no test coverage detected