ENH:optimize mem usage of imgui fonts loading

Change-Id: Icdd88b119c4406c407a955240698da5187f8efd8
This commit is contained in:
liz.li 2022-12-05 09:45:48 +08:00 committed by Lane.Wei
parent 41fcf8eb1e
commit 316ca3f5f5
4 changed files with 84 additions and 41 deletions

View file

@ -50,6 +50,7 @@ class ImGuiWrapper
bool m_font_cjk{ false };
float m_font_size{ 18.0 };
unsigned m_font_texture{ 0 };
unsigned m_font_another_texture{ 0 };
float m_style_scaling{ 1.0 };
unsigned m_mouse_buttons{ 0 };
bool m_disabled{ false };
@ -160,6 +161,8 @@ public:
const std::vector<std::string> get_fonts_names() const { return m_fonts_names; }
bool push_font_by_name(std::string font_name);
bool pop_font_by_name(std::string font_name);
void load_fonts_texture();
void destroy_fonts_texture();
void disabled_begin(bool disabled);
void disabled_end();