MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / UpdateTexturesNewFrame

Method UpdateTexturesNewFrame

3rdparty/imgui/src/imgui.cpp:8957–8978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8955//-----------------------------------------------------------------------------
8956
8957static void ImGui::UpdateTexturesNewFrame()
8958{
8959 // Cannot update every atlases based on atlas's FrameCount < g.FrameCount, because an atlas may be shared by multiple contexts with different frame count.
8960 ImGuiContext& g = *GImGui;
8961 const bool has_textures = (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) != 0;
8962 for (ImFontAtlas* atlas : g.FontAtlases)
8963 {
8964 if (atlas->OwnerContext == &g)
8965 {
8966 ImFontAtlasUpdateNewFrame(atlas, g.FrameCount, has_textures);
8967 }
8968 else
8969 {
8970 // (1) If you manage font atlases yourself, e.g. create a ImFontAtlas yourself you need to call ImFontAtlasUpdateNewFrame() on it.
8971 // Otherwise, calling ImGui::CreateContext() without parameter will create an atlas owned by the context.
8972 // (2) If you have multiple font atlases, make sure the 'atlas->RendererHasTextures' as specified in the ImFontAtlasUpdateNewFrame() call matches for that.
8973 // (3) If you have multiple imgui contexts, they also need to have a matching value for ImGuiBackendFlags_RendererHasTextures.
8974 IM_ASSERT(atlas->Builder != NULL && atlas->Builder->FrameCount != -1);
8975 IM_ASSERT(atlas->RendererHasTextures == has_textures);
8976 }
8977 }
8978}
8979
8980// Build a single texture list
8981static void ImGui::UpdateTexturesEndFrame()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected