[wpigui] Reload fonts to scale rather than preloading (#4712)

This commit is contained in:
Peter Johnson
2022-11-26 22:30:38 -08:00
committed by GitHub
parent e43e2fbc84
commit 1da84b2255
6 changed files with 76 additions and 40 deletions

View File

@@ -51,6 +51,11 @@ bool gui::PlatformInitRenderer() {
}
void gui::PlatformRenderFrame() {
if (gContext->reloadFonts) {
ImGui_ImplOpenGL2_DestroyFontsTexture();
ImGui_ImplOpenGL2_CreateFontsTexture();
gContext->reloadFonts = false;
}
ImGui_ImplOpenGL2_NewFrame();
CommonRenderFrame();