Docs: minor amends to ImTextureData comments.

This commit is contained in:
ocornut
2026-06-10 15:55:48 +02:00
parent 5220a3f48d
commit f1dd18b75c

View File

@@ -3513,7 +3513,7 @@ enum ImTextureStatus
// You may use ImTextureData::Updates[] for the list, or ImTextureData::UpdateBox for a single bounding box.
struct ImTextureRect
{
unsigned short x, y; // Upper-left coordinates of rectangle to update
unsigned short x, y; // Upper-left coordinates of rectangle to update, within the parent Pixels[] array.
unsigned short w, h; // Size of rectangle to update (in pixels)
};
@@ -3535,7 +3535,7 @@ struct ImTextureData
int Width; // w r // Texture width
int Height; // w r // Texture height
int BytesPerPixel; // w r // 4 or 1
unsigned char* Pixels; // w r // Pointer to buffer holding 'Width*Height' pixels and 'Width*Height*BytesPerPixels' bytes.
unsigned char* Pixels; // w r // Pointer to whole texture buffer holding 'Width*Height' pixels and 'Width*Height*BytesPerPixels' bytes.
ImTextureRect UsedRect; // w r // Bounding box encompassing all past and queued Updates[].
ImTextureRect UpdateRect; // w r // Bounding box encompassing all queued Updates[].
ImVector<ImTextureRect> Updates; // w r // Array of individual updates.