CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TextureProperties Struct Referencefinal

A structure that describes properties of an texture. More...

#include <CeresEngine/Texture/Texture.hpp>

Public Attributes

TextureType type = TextureType::Texture2D
 Hardware texture type. By default TextureType::Texture2D.
 
Format format = Format::RGBA8UNorm
 Hardware texture format. By default Format::RGBA8UNorm.
 
TExtent3< UInt32extent = {1, 1, 1}
 Texture extent.
 
UInt32 arrayLayers = 1
 Number of array layers.
 
UInt32 mipLevels = 1
 Number of MIP-map levels. By default 1.
 

Detailed Description

A structure that describes properties of an texture.

Member Data Documentation

◆ arrayLayers

UInt32 CeresEngine::TextureProperties::arrayLayers = 1

Number of array layers.

By default 1.

Remarks
This can be greater than 1 for array textures and cube textures (i.e. texture1DArray, texture2DArray, textureCube, textureCubeArray, texture2DMSArray). For cube textures, this must be a multiple of 6 (one array layer for each cube face). For all other texture types, this must be 1. The index offsets for each cube face are as follows:
  • X+ direction has index offset 0.
  • X- direction has index offset 1.
  • Y+ direction has index offset 2.
  • Y- direction has index offset 3.
  • Z+ direction has index offset 4.
  • Z- direction has index offset 5.

◆ extent

TExtent3<UInt32> CeresEngine::TextureProperties::extent = {1, 1, 1}

Texture extent.

By default (1, 1, 1).

Remarks
The height component is only used for 2D, 3D, and Cube textures (i.e. TextureType::Texture2D, TextureType::Texture2DArray, TextureType::Texture3D, TextureType::TextureCube, TextureType::TextureCubeArray, TextureType::Texture2DMS, TextureType::Texture2DMSArray). The depth component is only used for 3D textures (i.e. TextureType::Texture3D). For cube textures, the width and height component must be equal.

◆ format

Format CeresEngine::TextureProperties::format = Format::RGBA8UNorm

Hardware texture format. By default Format::RGBA8UNorm.

◆ mipLevels

UInt32 CeresEngine::TextureProperties::mipLevels = 1

Number of MIP-map levels. By default 1.

◆ type

TextureType CeresEngine::TextureProperties::type = TextureType::Texture2D

Hardware texture type. By default TextureType::Texture2D.


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