MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / UpdateTexturesNewFrame

Method UpdateTexturesNewFrame

imgui_tiny_app/imgui/imgui.cpp:9534–9555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9532//-----------------------------------------------------------------------------
9533
9534static 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
9558static void ImGui::UpdateTexturesEndFrame()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected