1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-03 03:50:06 +00:00

Fonts: Comments, remove ImFontAtlas facing BuildGrowTexture(), BuildCompactTexture(). Make IsBuilt() obsolete.

This commit is contained in:
ocornut 2025-01-13 20:03:09 +01:00
parent 8ed4e2dde7
commit 288055180e
4 changed files with 58 additions and 76 deletions

View file

@ -5180,7 +5180,7 @@ void ImGui::UpdateHoveredWindowAndCaptureFlags(const ImVec2& mouse_pos)
static void ImGui::UpdateTexturesNewFrame()
{
// FIXME-NEWATLAS: How to reach/target all atlas?
// FIXME-NEWATLAS-V2: If we aim to support multiple atlases used by same context: how to reach/target all atlases?
ImGuiContext& g = *GImGui;
ImFontAtlas* atlas = g.IO.Fonts;
if (g.FontAtlasOwnedByContext)
@ -8607,7 +8607,7 @@ void ImGui::SetCurrentFont(ImFont* font)
// - The right-ish solution may be to remove _SetTextureID() and make AddText/RenderText lazily call PushTextureID()/PopTextureID()
// the same way AddImage() does, but then all other primitives would also need to? I don't think we should tackle this problem
// because we have a concrete need and a test bed for multiple atlas textures.
// FIXME-NEWATLAS: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ?
// FIXME-NEWATLAS-V2: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ?
void ImGui::PushFont(ImFont* font)
{
ImGuiContext& g = *GImGui;