TextureLayered

Inherits: Texture < Resource < RefCounted < Object

Inherited By: ImageTextureLayered, StreamTextureLayered

Base class for 3D texture types.

Description

Base class for Texture2DArray, Cubemap and CubemapArray. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For Texture2DArrays, the layer specifies the array layer.

Methods

Format

get_format ( ) const

int

get_height ( ) const

Image

get_layer_data ( int layer ) const

LayeredType

get_layered_type ( ) const

int

get_layers ( ) const

int

get_width ( ) const

bool

has_mipmaps ( ) const

Enumerations

enum LayeredType:

  • LAYERED_TYPE_2D_ARRAY = 0

  • LAYERED_TYPE_CUBEMAP = 1

  • LAYERED_TYPE_CUBEMAP_ARRAY = 2

Method Descriptions

Returns the current format being used by this texture. See Format for details.


  • int get_height ( ) const

Returns the height of the texture. Height is typically represented by the Y-axis.


  • Image get_layer_data ( int layer ) const

Returns an Image resource with the data from specified layer.



  • int get_layers ( ) const


  • int get_width ( ) const

Returns the width of the texture. Width is typically represented by the X-axis.


  • bool has_mipmaps ( ) const