summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/imgui/imgui.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-05-30 14:57:13 +0200
committer ImJezze <jezze@gmx.net>2015-05-30 14:57:13 +0200
commitd1d9dfc2d4be85cee8c8c990950d72ee6df78e5e (patch)
tree495d4e5a066ee13be131f08437732b3588d43a42 /3rdparty/bgfx/examples/common/imgui/imgui.cpp
parentfe71f92dd24270ae7c5621166b096c665ca0e4f5 (diff)
parent51709eef04f9f0c6d621447c568e170927fa9472 (diff)
Merge pull request #4 from mamedev/master
Sync to base master
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);