struct
TextureProperties
Public
Constructors
TextureProperties
TextureProperties
Methods
HasAlpha
Returns true if the texture has an alpha layer.
GetFaceCount
Returns the number of faces this texture has.
This includes array slices (if texture is an array texture), as well as cube-map faces.
AllocBuffer
Allocates a buffer that exactly matches the format of the texture described by these properties, for the provided face and mip level.
This is a helper function, primarily meant for creating buffers when reading from, or writing to a texture.
Fields
Name
Optional name of the texture.
Used primarily for easier debugging.
Width
Width of the texture in pixels.
Height
Height of the texture in pixels.
Depth
Depth of the texture in pixels (Must be 1 for 2D textures).
MipMapCount
Number of mip-maps the texture has.
This number excludes the full resolution map.
Usage
Describes how the caller plans on using the texture in the pipeline.
UseHardwareSRGB
If true the texture data is assumed to be in SRGB space and will be converted back to linear space when sampled on GPU.
SampleCount
Number of samples per pixel.
Set to 1 or 0 to use the default of a single sample per pixel.
ArraySliceCount
Number of texture slices to create if creating a texture array.
Ignored for 3D textures.
Protected
Methods
MapFromSubresourceIdx
Maps a sub-resource index to an exact face and mip level.
Sub-resource indexes are used when reading or writing to the resource.
MapToSubresourceIdx
Map a face and a mip level to a sub-resource index you can use for updating or reading a specific sub-resource.