Home -> ITextureBuffer -> SetTextureDimensions

Description

The SetTextureDimensions method specifies the dimensions of mipmap level zero and the number of mipmap levels to allocate for a texture. The overload selected depends on the concrete texture type.

Mipmap dimensions are derived from the base dimensions by repeatedly halving each dimension down to a minimum of one pixel. The created mipmap count and per-level dimensions can be queried after allocation with MipmapLevelCount and MipmapLevelDimensions.

ImportantImportant

This method must be called before AllocateMemory. The requested dimensions must also fit within the relevant limits reported by GetImageLimits.

Usage

void SetTextureDimensions(const V1UInt32& imageDimensions, int mipmapLevelCount = 1);
void SetTextureDimensions(const V1UInt32& imageDimensions, size_t arraySize, int mipmapLevelCount = 1);
void SetTextureDimensions(const V2UInt32& imageDimensions, int mipmapLevelCount = 1);
void SetTextureDimensions(const V2UInt32& imageDimensions, size_t arraySize, int mipmapLevelCount = 1);
void SetTextureDimensions(const V3UInt32& imageDimensions, int mipmapLevelCount = 1);
void SetTextureDimensions(uint32_t faceLength, int mipmapLevelCount = 1);
void SetTextureDimensions(uint32_t faceLength, size_t arraySize, int mipmapLevelCount = 1);

Argument list

imageDimensions [V1UInt32, V2UInt32, or V3UInt32]
The texture dimensions at mipmap level zero.
faceLength [uint32_t]
The width and height of each cubemap face at mipmap level zero.
arraySize [size_t]
The number of array entries to allocate for array texture types.
mipmapLevelCount [int]
The number of mipmap levels to allocate. Use one for a texture without additional mipmap levels.

See also