MCPcopy Create free account
hub / github.com/cinder/Cinder / ImFontAtlasBuildMain

Function ImFontAtlasBuildMain

src/imgui/imgui_draw.cpp:3363–3381  ·  view source on GitHub ↗

When atlas->RendererHasTextures = true, this is only called if no font were loaded.

Source from the content-addressed store, hash-verified

3361
3362// When atlas->RendererHasTextures = true, this is only called if no font were loaded.
3363void ImFontAtlasBuildMain(ImFontAtlas* atlas)
3364{
3365 IM_ASSERT(!atlas->Locked && "Cannot modify a locked ImFontAtlas!");
3366 if (atlas->TexData && atlas->TexData->Format != atlas->TexDesiredFormat)
3367 ImFontAtlasBuildClear(atlas);
3368
3369 if (atlas->Builder == NULL)
3370 ImFontAtlasBuildInit(atlas);
3371
3372 // Default font is none are specified
3373 if (atlas->Sources.Size == 0)
3374 atlas->AddFontDefault();
3375
3376 // [LEGACY] For backends not supporting RendererHasTextures: preload all glyphs
3377 ImFontAtlasBuildUpdateRendererHasTexturesFromContext(atlas);
3378 if (atlas->RendererHasTextures == false) // ~ImGuiBackendFlags_RendererHasTextures
3379 ImFontAtlasBuildLegacyPreloadAllGlyphRanges(atlas);
3380 atlas->TexIsBuilt = true;
3381}
3382
3383void ImFontAtlasBuildGetOversampleFactors(ImFontConfig* src, ImFontBaked* baked, int* out_oversample_h, int* out_oversample_v)
3384{

Callers 3

GetDefaultFontMethod · 0.85
BuildMethod · 0.85

Tested by

no test coverage detected