Added asserts to catch illegal modifications of the font atlas between NewFrame() and EndFrame()/Render(). (#1958)

This commit is contained in:
omar
2018-07-22 18:53:27 +02:00
parent e07f5d4c78
commit 4ebd442a24
3 changed files with 14 additions and 0 deletions

View File

@ -1852,6 +1852,7 @@ struct ImFontAtlas
// Members
//-------------------------------------------
bool Locked; // Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
ImFontAtlasFlags Flags; // Build flags (see ImFontAtlasFlags_)
ImTextureID TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.