mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-29 23:06:35 +00:00
ImFontAtlas::Build() does a sanity memset on glyph rectangles.
This commit is contained in:
parent
4c4bbcb451
commit
64679a0b03
@ -6602,6 +6602,7 @@ bool ImFontAtlas::Build()
|
|||||||
stbrp_rect* buf_rects = (stbrp_rect*)ImGui::MemAlloc(total_glyph_count * sizeof(stbrp_rect));
|
stbrp_rect* buf_rects = (stbrp_rect*)ImGui::MemAlloc(total_glyph_count * sizeof(stbrp_rect));
|
||||||
stbtt_pack_range* buf_ranges = (stbtt_pack_range*)ImGui::MemAlloc(total_glyph_range_count * sizeof(stbtt_pack_range));
|
stbtt_pack_range* buf_ranges = (stbtt_pack_range*)ImGui::MemAlloc(total_glyph_range_count * sizeof(stbtt_pack_range));
|
||||||
memset(buf_packedchars, 0, total_glyph_count * sizeof(stbtt_packedchar));
|
memset(buf_packedchars, 0, total_glyph_count * sizeof(stbtt_packedchar));
|
||||||
|
memset(buf_rects, 0, total_glyph_count * sizeof(stbrp_rect)); // Unnessary but let's clear this for the sake of sanity.
|
||||||
memset(buf_ranges, 0, total_glyph_range_count * sizeof(stbtt_pack_range));
|
memset(buf_ranges, 0, total_glyph_range_count * sizeof(stbtt_pack_range));
|
||||||
|
|
||||||
// First pass: pack all glyphs (no rendering at this point, we are working with glyph sizes only)
|
// First pass: pack all glyphs (no rendering at this point, we are working with glyph sizes only)
|
||||||
|
Loading…
Reference in New Issue
Block a user