FIX:need a new frame when reload fonts

Change-Id: Ib59359fd1dd327a1e29990b5e774779fa672e04d
This commit is contained in:
liz.li 2022-12-05 13:19:45 +08:00 committed by Lane.Wei
parent 4700362f10
commit 06e3c22b92
2 changed files with 13 additions and 0 deletions

View file

@ -2275,9 +2275,15 @@ void ImGuiWrapper::destroy_font()
void ImGuiWrapper::destroy_fonts_texture() {
if (m_font_another_texture != 0) {
if (m_new_frame_open) {
render();
}
init_font(true);
glsafe(::glDeleteTextures(1, &m_font_another_texture));
m_font_another_texture = 0;
if (!m_new_frame_open) {
new_frame();
}
}
}