You should not need to call this manually! If you think you do, let us know and we can advise about policies auto-compact.
| 4247 | // You should not need to call this manually! |
| 4248 | // If you think you do, let us know and we can advise about policies auto-compact. |
| 4249 | void ImFontAtlasTextureCompact(ImFontAtlas* atlas) |
| 4250 | { |
| 4251 | ImFontAtlasBuilder* builder = atlas->Builder; |
| 4252 | ImFontAtlasBuildDiscardBakes(atlas, 1); |
| 4253 | |
| 4254 | ImTextureData* old_tex = atlas->TexData; |
| 4255 | ImVec2i old_tex_size = ImVec2i(old_tex->Width, old_tex->Height); |
| 4256 | ImVec2i new_tex_size = ImFontAtlasTextureGetSizeEstimate(atlas); |
| 4257 | if (builder->RectsDiscardedCount == 0 && new_tex_size.x == old_tex_size.x && new_tex_size.y == old_tex_size.y) |
| 4258 | return; |
| 4259 | |
| 4260 | ImFontAtlasTextureRepack(atlas, new_tex_size.x, new_tex_size.y); |
| 4261 | } |
| 4262 | |
| 4263 | // Start packing over current empty texture |
| 4264 | void ImFontAtlasBuildInit(ImFontAtlas* atlas) |
no test coverage detected