(you may also go to Demo>About Window, and click "Config/Build Information" to obtain a bunch of detailed information that you can paste here)
Version/Branch of Dear ImGui:
Version: v1.89.4
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: Linux
My Issue/Question:
I'm trying to reload the font while application is running (before calling ImGui::NewFrame() )"
io.Fonts->ClearFonts();
io.Fonts->AddFontFromFileTTF("misc/DejaVuSans.ttf", font_size);
When I try that, the application fails on an assert:
main: /home/quinor/kody/tsparter/build/_deps/imgui-src/imgui.cpp:8976: void ImGui::ErrorCheckNewFrameSanityChecks(): Assertion `g.IO.Fonts->IsBuilt() && "Font Atlas not built! Make sure you called ImGui_ImplXXXX_NewFrame() function for renderer backend, which should call io.Fonts->GetTexDataAsRGBA32() / GetTexDataAsAlpha8()"' failed.
What happens is, ImGui_ImplOpenGL3_NewFrame only reloads fonts (ImGui_ImplOpenGL3_CreateFontsTexture) first time NewFrame is called because of logic here
Is this a bug or intended behavior (ie. I'm not supposed to reload fonts while running)?
(you may also go to Demo>About Window, and click "Config/Build Information" to obtain a bunch of detailed information that you can paste here)
Version/Branch of Dear ImGui:
Version: v1.89.4
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: Linux
My Issue/Question:
I'm trying to reload the font while application is running (before calling
ImGui::NewFrame())"When I try that, the application fails on an assert:
What happens is,
ImGui_ImplOpenGL3_NewFrameonly reloads fonts (ImGui_ImplOpenGL3_CreateFontsTexture) first time NewFrame is called because of logic hereIs this a bug or intended behavior (ie. I'm not supposed to reload fonts while running)?