1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Textures: Added atlas's TexMinWidth/TexMinHeight/TexMaxWidth/TexMaxHeight.

Fixed ImFontAtlasBuildGetTextureSizeEstimate().
Basic error handling on OOM.
This commit is contained in:
ocornut 2025-01-09 23:04:00 +01:00
parent 14614f561b
commit 2137b3448b
4 changed files with 43 additions and 9 deletions

View file

@ -3696,7 +3696,7 @@ struct ImFontAtlasBuilder
ImFontAtlasRectId PackIdMouseCursors; // White pixel + mouse cursors. Also happen to be fallback in case of packing failure.
ImFontAtlasRectId PackIdLinesTexData;
ImFontAtlasBuilder() { memset(this, 0, sizeof(*this)); RectsIndexFreeListStart = -1; }
ImFontAtlasBuilder() { memset(this, 0, sizeof(*this)); RectsIndexFreeListStart = -1; PackIdMouseCursors = PackIdLinesTexData = -1; }
};
// FIXME-NEWATLAS: Cleanup