summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/imgui/imgui.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-05-27 12:07:35 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-05-27 12:07:35 +0200
commita163b2827775c215703723e0e3ab94aab63d359f (patch)
tree52e04089b7d0d954d646be0e9536486a7ea33827 /3rdparty/bgfx/examples/common/imgui/imgui.cpp
parent08bfa598dfc7b27942f41a6df63b78d233a1abd5 (diff)
Update BGFX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/imgui/imgui.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/imgui/imgui.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.cpp b/3rdparty/bgfx/examples/common/imgui/imgui.cpp
index 6d2d566dbec..d44a4a46a45 100644
--- a/3rdparty/bgfx/examples/common/imgui/imgui.cpp
+++ b/3rdparty/bgfx/examples/common/imgui/imgui.cpp
@@ -604,12 +604,11 @@ struct Imgui
bgfx::destroyUniform(u_imageSwizzle);
bgfx::destroyUniform(s_texColor);
#if !USE_NANOVG_FONT
- for (uint16_t ii = 0; ii < IMGUI_CONFIG_MAX_FONTS; ++ii)
+ for (uint16_t ii = 0, num = m_fontHandle.getNumHandles(); ii < num; ++ii)
{
- if (bgfx::isValid(m_fonts[ii].m_texture) )
- {
- bgfx::destroyTexture(m_fonts[ii].m_texture);
- }
+ uint16_t idx = m_fontHandle.getHandleAt(0);
+ bgfx::destroyTexture(m_fonts[idx].m_texture);
+ m_fontHandle.free(idx);
}
#endif // !USE_NANOVG_FONT
bgfx::destroyTexture(m_missingTexture);