HgiTextureDesc Struct Reference

Describes the properties needed to create a GPU texture. More...

Public Attributes

std::string debugName
HgiTextureUsage usage
HgiFormat format
HgiComponentMapping componentMapping
HgiTextureType type
GfVec3i dimensions
uint16_t layerCount
uint16_t mipLevels
HgiSampleCount sampleCount
size_t pixelsByteSize
void const * initialData

Detailed Description

Describes the properties needed to create a GPU texture.

  • debugName: This label can be applied as debug label for GPU debugging.
  • usage: Describes how the texture is intended to be used.
  • format: The format of the texture.
  • componentMapping: The mapping of rgba components when accessing the texture.
  • dimensions: The resolution of the texture (width, height, depth).
  • type: Type of texture (2D, 3D).
  • layerCount: The number of layers (texture-arrays).
  • mipLevels: The number of mips in texture.
  • sampleCount: samples per texel (multi-sampling).
  • pixelsByteSize: Byte size (length) of pixel data (i.e., initialData).
  • initialData: CPU pointer to initialization pixels of the texture. The memory is consumed immediately during the creation of the HgiTexture. The application may alter or free this memory as soon as the constructor of the HgiTexture has returned. Data may optionally include pixels for each mip-level. HgiGetMipInitialData can be used to get to each mip's data and describes in more detail how mip dimensions are rounded.

Definition at line 107 of file texture.h.

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