struct TextureCreateInformation

Inherits: TextureInformation

Descriptor structure used for initialization of a Texture.

Public

Constructors

TextureCreateInformation

TextureCreateInformation() = default

TextureCreateInformation

TextureCreateInformation(const TextureInformation &other)

TextureCreateInformation

TextureCreateInformation(const SPtr<PixelData> &initialData)

Methods

staticCreateFromPixelData

static TextureCreateInformation CreateFromPixelData(const SPtr<PixelData> &pixelData)

Initializes the structure so that is creates a texture that can fit the provided pixel data.

Fields

InitialData

SPtr<PixelData> InitialData

Name

String Name

Optional name of the texture.

Used primarily for easier debugging.

Type

Type of the texture.

Format

Format of pixels in the texture.

Width

u32 Width

Width of the texture in pixels.

Height

u32 Height

Height of the texture in pixels.

Depth

u32 Depth

Depth of the texture in pixels (Must be 1 for 2D textures).

MipMapCount

u32 MipMapCount

Number of mip-maps the texture has.

This number excludes the full resolution map.

Usage

TextureUsageFlags Usage

Describes how the caller plans on using the texture in the pipeline.

UseHardwareSRGB

bool 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

u32 SampleCount

Number of samples per pixel.

Set to 1 or 0 to use the default of a single sample per pixel.

ArraySliceCount

u32 ArraySliceCount

Number of texture slices to create if creating a texture array.

Ignored for 3D textures.