ImFontAtlas: Added TexUvScale (= 1.0f / (float)TexWidth, 1.0f / (float)TexHeight)

This commit is contained in:
omar
2018-01-20 20:32:23 +01:00
parent cd1409f4bf
commit 5eb293c879
2 changed files with 13 additions and 11 deletions

View File

@ -1631,6 +1631,7 @@ struct ImFontAtlas
unsigned int* TexPixelsRGBA32; // 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
int TexWidth; // Texture width calculated during Build().
int TexHeight; // Texture height calculated during Build().
ImVec2 TexUvScale; // = (1.0f/TexWidth, 1.0f/TexHeight)
ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel
ImVector<ImFont*> Fonts; // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
ImVector<CustomRect> CustomRects; // Rectangles for packing custom texture data into the atlas.