ImTextureData

imguicpp.ImTextureData (extern class)

Static Members

create(self: cpp.Star, format: ImTextureFormat, w: Int, h: Int): Void
Name Type
self cpp.Star
format ImTextureFormat
w Int
h Int

destroyPixels(self: cpp.Star): Void
Name Type
self cpp.Star

getPixels(self: cpp.Star): cpp.RawPointer<cpp.Void>
Name Type
self cpp.Star
Returns
cpp.RawPointer<cpp.Void>

getPixelsAt(self: cpp.Star, x: Int, y: Int): cpp.RawPointer<cpp.Void>
Name Type
self cpp.Star
x Int
y Int
Returns
cpp.RawPointer<cpp.Void>

getSizeInBytes(self: cpp.Star): Int
Name Type
self cpp.Star
Returns
Int

getPitch(self: cpp.Star): Int
Name Type
self cpp.Star
Returns
Int

getTexRef(self: cpp.Star): ImTextureRef
Name Type
self cpp.Star
Returns
ImTextureRef

getTexID(self: cpp.Star): cpp.UInt64
Name Type
self cpp.Star
Returns
cpp.UInt64

setTexID(self: cpp.Star, texId: cpp.UInt64): Void
Name Type
self cpp.Star
texId cpp.UInt64

setStatus(self: cpp.Star, status: ImTextureStatus): Void
Name Type
self cpp.Star
status ImTextureStatus

Instance Members

uniqueID: Int

w - // [DEBUG] Sequential index to facilitate identifying a texture when debugging/printing. Unique per atlas.


rw rw // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy. Always use SetStatus() to modify!


backendUserData: cpp.RawPointer<cpp.Void>
  • rw // Convenience storage for backend. Some backends may have enough with TexID.

r w // Backend-specific texture identifier. Always use SetTexID() to modify! The identifier will stored in ImDrawCmd::GetTexID() and passed to backend's RenderDrawData function.


w r // ImTextureFormat_RGBA32 (default) or ImTextureFormat_Alpha8


width: Int

w r // Texture width


height: Int

w r // Texture height


bytesPerPixel: Int

w r // 4 or 1


pixels: cpp.Star

w r // Pointer to buffer holding 'WidthHeight' pixels and 'WidthHeight*BytesPerPixels' bytes.


usedRect: ImTextureRect

w r // Bounding box encompassing all past and queued Updates[].


updateRect: ImTextureRect

w r // Bounding box encompassing all queued Updates[].


w r // Array of individual updates.


unusedFrames: Int

w r // In order to facilitate handling Status==WantDestroy in some backend: this is a count successive frames where the texture was not used. Always >0 when Status==WantDestroy.


refCount: cpp.UInt16

w r // Number of contexts using this texture. Used during backend shutdown.


useColors: Bool

w r // Tell whether our texture data is known to use colors (rather than just white + alpha).


wantDestroyNextFrame: Bool

rw - // [Internal] Queued to set ImTextureStatus_WantDestroy next frame. May still be used in the current frame.

Metadata

Name Parameters
:structAccess -
:include "linc_imgui.h"