MCPcopy Create free account
hub / github.com/cinder/Cinder / UpdateTexturesNewFrame

Method UpdateTexturesNewFrame

src/imgui/imgui.cpp:8730–8751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8728//-----------------------------------------------------------------------------
8729
8730static void ImGui::UpdateTexturesNewFrame()
8731{
8732 // Cannot update every atlases based on atlas's FrameCount < g.FrameCount, because an atlas may be shared by multiple contexts with different frame count.
8733 ImGuiContext& g = *GImGui;
8734 const bool has_textures = (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) != 0;
8735 for (ImFontAtlas* atlas : g.FontAtlases)
8736 {
8737 if (atlas->OwnerContext == &g)
8738 {
8739 ImFontAtlasUpdateNewFrame(atlas, g.FrameCount, has_textures);
8740 }
8741 else
8742 {
8743 // (1) If you manage font atlases yourself, e.g. create a ImFontAtlas yourself you need to call ImFontAtlasUpdateNewFrame() on it.
8744 // Otherwise, calling ImGui::CreateContext() without parameter will create an atlas owned by the context.
8745 // (2) If you have multiple font atlases, make sure the 'atlas->RendererHasTextures' as specified in the ImFontAtlasUpdateNewFrame() call matches for that.
8746 // (3) If you have multiple imgui contexts, they also need to have a matching value for ImGuiBackendFlags_RendererHasTextures.
8747 IM_ASSERT(atlas->Builder != NULL && atlas->Builder->FrameCount != -1);
8748 IM_ASSERT(atlas->RendererHasTextures == has_textures);
8749 }
8750 }
8751}
8752
8753// Build a single texture list
8754static void ImGui::UpdateTexturesEndFrame()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected