1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +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

@ -3596,6 +3596,10 @@ struct ImFontAtlas
ImFontAtlasFlags Flags; // Build flags (see ImFontAtlasFlags_)
ImTextureFormat TexDesiredFormat; // Desired texture format (default to ImTextureFormat_RGBA32 but may be changed to ImTextureFormat_Alpha8).
int TexGlyphPadding; // FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = false).
int TexMinWidth; // Minimum desired texture width. Must be a power of two. Default to 512.
int TexMinHeight; // Minimum desired texture height. Must be a power of two. Default to 128.
int TexMaxWidth; // Maximum desired texture width. Must be a power of two. Default to 8192.
int TexMaxHeight; // Maximum desired texture height. Must be a power of two. Default to 8192.
void* UserData; // Store your own atlas related user-data (if e.g. you have multiple font atlas).
// [Internal]