LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::TextureSubresource Struct Reference

Texture subresource descriptor which specifies the array layer and MIP-map level range of a texture resource. More...

#include <TextureFlags.h>

Public Member Functions

 TextureSubresource ()=default
 TextureSubresource (std::uint32_t baseArrayLayer, std::uint32_t baseMipLevel)
 Constructor to initialize base MIP-map level and base array layer only.
 TextureSubresource (std::uint32_t baseArrayLayer, std::uint32_t numArrayLayers, std::uint32_t baseMipLevel, std::uint32_t numMipLevels)
 Constructor to initialize all attributes.

Public Attributes

std::uint32_t baseArrayLayer = 0
 Zero-based index of the first array layer. By default 0.
std::uint32_t numArrayLayers = 1
 Number of array layers. By default 1.
std::uint32_t baseMipLevel = 0
 MIP-map level for the sub-texture, where 0 is the base texture, and N > 0 is the N-th MIP-map level. By default 0.
std::uint32_t numMipLevels = 1
 Number of MIP-map levels. By default 1.

Detailed Description

Texture subresource descriptor which specifies the array layer and MIP-map level range of a texture resource.

Remarks
The default values refer to the first array layer and the first MIP-map level.
See also
TextureRegion::subresource
TextureViewDescriptor::subresource

Constructor & Destructor Documentation

◆ TextureSubresource() [1/3]

LLGL::TextureSubresource::TextureSubresource ( )
default

◆ TextureSubresource() [2/3]

LLGL::TextureSubresource::TextureSubresource ( std::uint32_t baseArrayLayer,
std::uint32_t baseMipLevel )
inline

Constructor to initialize base MIP-map level and base array layer only.

◆ TextureSubresource() [3/3]

LLGL::TextureSubresource::TextureSubresource ( std::uint32_t baseArrayLayer,
std::uint32_t numArrayLayers,
std::uint32_t baseMipLevel,
std::uint32_t numMipLevels )
inline

Constructor to initialize all attributes.

Member Data Documentation

◆ baseArrayLayer

std::uint32_t LLGL::TextureSubresource::baseArrayLayer = 0

Zero-based index of the first array layer. By default 0.

Remarks
Only used by array texture types (i.e. TextureType::Texture1DArray, TextureType::Texture2DArray, TextureType::TextureCubeArray, and TextureType::Texture2DMSArray).
This field is ignored by all other texture types.
See also
TextureDescriptor::arrayLayers

◆ baseMipLevel

std::uint32_t LLGL::TextureSubresource::baseMipLevel = 0

MIP-map level for the sub-texture, where 0 is the base texture, and N > 0 is the N-th MIP-map level. By default 0.

See also
TextureDescriptor::mipLevels

◆ numArrayLayers

std::uint32_t LLGL::TextureSubresource::numArrayLayers = 1

Number of array layers. By default 1.

Remarks
Must be greater than zero.
See also
TextureDescriptor::arrayLayers

◆ numMipLevels

std::uint32_t LLGL::TextureSubresource::numMipLevels = 1

Number of MIP-map levels. By default 1.

Remarks
Must be greater than zero.
See also
TextureDescriptor::mipLevels

The documentation for this struct was generated from the following file: