(Breaking) Default ImTextureID to use a Im64 instead of void* (#1641)

This commit is contained in:
ocornut
2024-10-07 16:45:34 +02:00
parent 19b494df89
commit 92b94980c6
19 changed files with 69 additions and 79 deletions

View File

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