Class Texture
A handle to a texture on the GPU.
class Texture
;
Fields
Name | Type | Description |
---|---|---|
descriptor
|
const(__C | Describes this texture. |
label
|
const(string) | Optional, human-readable debug label for this texture. |
Properties
Name | Type | Description |
---|---|---|
asImageCopy [get]
|
__C | Make an ImageCopyTexture representing the whole texture.
|
bytesPerBlock [get]
|
uint | Bytes per “block” of this texture. |
bytesPerRow [get]
|
uint | Size of one row of a texture's pixels/blocks, in bytes. |
dataLayout [get]
|
__C | Make a TextureDataLayout given this texture's size and TextureFormat .
|
defaultView [get]
|
TextureView | Creates a default view of this whole texture. |
height [get]
|
uint | |
paddedBytesPerRow [get]
|
uint | Size of one row of a texture's pixels/blocks, in bytes. Aligned to COPY_BYTES_PER_ROW_ALIGNMENT .
|
pixelsPerBlock [get]
|
uint | |
rowsPerImage [get]
|
uint | “Rows” that make up a single “image”. |
size [get]
|
__C | Size and depth/layer count of this texture. |
width [get]
|
uint |
Methods
Name | Description |
---|---|
asRenderTarget
(blend, writeMask)
|
Make a ColorTargetState given this texture's TextureFormat and a constant blending mode.
|
asRenderTarget
(blend, writeMask)
|
Make a ColorTargetState given this texture's TextureFormat and a custom blending mode.
|
createView
(descriptor)
|
Creates a view of this texture. |
destroy
()
|
Release the given handle. |
multisampleState
(mask, alphaToCoverageEnabled)
|
Creates a multisample state given this texture's TextureDescriptor .
|