1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-18 10:35:59 +01:00

Fixed building when defining ImTextureID to a multi-token name. (#1641)

Amend 92b9498
This commit is contained in:
ocornut 2024-10-08 14:29:21 +02:00
parent 92b94980c6
commit 6b8accbfa1

View File

@ -619,7 +619,7 @@ void ImDrawList::PushTextureID(ImTextureID texture_id)
void ImDrawList::PopTextureID() void ImDrawList::PopTextureID()
{ {
_TextureIdStack.pop_back(); _TextureIdStack.pop_back();
_CmdHeader.TextureId = (_TextureIdStack.Size == 0) ? ImTextureID() : _TextureIdStack.Data[_TextureIdStack.Size - 1]; _CmdHeader.TextureId = (_TextureIdStack.Size == 0) ? (ImTextureID)NULL : _TextureIdStack.Data[_TextureIdStack.Size - 1];
_OnChangedTextureID(); _OnChangedTextureID();
} }
@ -2777,7 +2777,7 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
ImFontAtlasBuildInit(atlas); ImFontAtlasBuildInit(atlas);
// Clear atlas // Clear atlas
atlas->TexID = ImTextureID(); atlas->TexID = (ImTextureID)NULL;
atlas->TexWidth = atlas->TexHeight = 0; atlas->TexWidth = atlas->TexHeight = 0;
atlas->TexUvScale = ImVec2(0.0f, 0.0f); atlas->TexUvScale = ImVec2(0.0f, 0.0f);
atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f); atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f);