mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-26 02:34:23 +00:00
Fonts: clarify ClearTexData() as not supported with dynamic atlases.
This commit is contained in:
parent
093d01269a
commit
80404fae30
3 changed files with 30 additions and 22 deletions
|
|
@ -5785,7 +5785,8 @@ void ImGui::EndFrame()
|
|||
UpdateTexturesEndFrame();
|
||||
|
||||
// Unlock font atlas
|
||||
g.IO.Fonts->Locked = false;
|
||||
ImFontAtlas* atlas = g.IO.Fonts;
|
||||
atlas->Locked = false;
|
||||
|
||||
// Clear Input data for next frame
|
||||
g.IO.MousePosPrev = g.IO.MousePos;
|
||||
|
|
@ -8575,8 +8576,9 @@ bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
|
|||
void ImGui::UpdateFontsNewFrame()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImFontAtlas* atlas = g.IO.Fonts;
|
||||
if ((g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) == 0)
|
||||
g.IO.Fonts->Locked = true;
|
||||
atlas->Locked = true;
|
||||
SetCurrentFont(GetDefaultFont(), GetDefaultFont()->Sources[0].SizePixels);
|
||||
IM_ASSERT(g.Font->IsLoaded());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue