Optionalformat: EnumValue<PixelFormat>Optionaldepth: numberOptionalpixelFormat: EnumValue<PixelFormat>OptionalisInternalConstructor: booleanReturns extents of the pixel volume this object is capable of holding.
Returns the pixel format used by the internal buffer for storing the pixels.
Return whether this buffer is laid out consecutive in memory (meaning the pitches are equal to the dimensions).
Returns the number of bytes that offsets one row from another. This can be exact number of bytes required to hold "width" pixel, but doesn't have to be as some buffers require padding.
Return the size (in bytes) of the buffer this image requires.
Returns the number of bytes that offsets one depth slice from another. This can be exact number of bytes required to hold "width * height" pixels, but doesn't have to be as some buffers require padding.
Returns a pixel at the specified location in the buffer.
X coordinate of the pixel.
Y coordinate of the pixel.
Optionalz: number
Z coordinate of the pixel.
Value of the pixel, or undefined value if coordinates are out of range.
Returns values of all pixels.
All pixels in the buffer ordered consecutively. Pixels are stored as a succession of "depth" slices, each containing "height" rows of "width" pixels.
Returns all pixels in the buffer as raw bytes.
Raw pixel bytes. It is up to the caller to interpret the pixel format and account for potential row and slice pitch values.
Sets all pixels in the buffer.Caller must ensure that number of pixels match the extends of the buffer.
Sets all pixels in the buffer as raw bytes.
Raw pixel bytes. It is up to the caller to interpret the pixel format and account for potential row and slice pitch values.
A buffer describing a volume (3D), image (2D) or line (1D) of pixels in memory. Pixels are stored as a succession of "depth" slices, each containing "height" rows of "width" pixels.
Note
If using the constructor instead of Create() you must call GPUResourceData::allocateInternalBuffer or set the buffer in some other way before reading/writing from this object, as by the default there is no buffer allocated.