Textures: Fixed support for #define ImTextureID_Invalid to non-zero value.

This commit is contained in:
ocornut
2025-06-27 17:03:13 +02:00
parent 0fe5166531
commit bc051dcf91
2 changed files with 4 additions and 1 deletions

View File

@@ -43,6 +43,9 @@ Breaking changes:
Other changes:
- Textures: Fixed support for `#define ImTextureID_Invalid` to non-zero value:
ImTextureData() was incorrectly cleared with zeroes. (#8745) [@rachit7645]
- Demo: Added "Text -> Font Size" demo section. (#8738) [@Demonese]
- Backends: SDL3: avoid calling SDL_StartTextInput() again if already active.
(#8727) [@morrazzzz]
- Backends: OSX: added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress

View File

@@ -3440,7 +3440,7 @@ struct ImTextureData
bool WantDestroyNextFrame; // rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the current frame.
// Functions
ImTextureData() { memset(this, 0, sizeof(*this)); }
ImTextureData() { memset(this, 0, sizeof(*this)); TexID = ImTextureID_Invalid; }
~ImTextureData() { DestroyPixels(); }
IMGUI_API void Create(ImTextureFormat format, int w, int h);
IMGUI_API void DestroyPixels();