TextureLayered
Inherited By: , TextureArray
Base class for 3D texture types.
Base class for and TextureArray. Cannot be used directly, but contains all the functions necessary for accessing and using and TextureArray. Data is set on a per-layer basis. For s, the layer specifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for TextureArrays, the layer specifies the array layer.
Properties
Enumerations
enum Flags:
- FLAG_REPEAT = 2 —- Texture will repeat when UV used is outside the 0-1 range.
- FLAG_FILTER = 4 —- Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels.
- FLAGS_DEFAULT = 4 —- Equivalent to .
- Dictionary data
- flags
Specifies which Flags apply to this texture.
Method Descriptions
Creates the Texture3D or with specified width
, , and depth
. See Format for format
options. See enumerator for flags
options.
Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
- Format get_format ( ) const
Returns the current format being used by this texture. See for details.
- int get_height ( ) const
- get_layer_data ( int layer ) const
Returns an resource with the data from specified layer
.
- int get_width ( ) const
Returns the width of the texture. Width is typically represented by the X-axis.
Partially sets the data for a specified by overwriting using the data of the specified image
. x_offset
and y_offset
determine where the Image is “stamped” over the texture. The image
must fit within the texture.
- void set_layer_data ( image, int layer )
Sets the data for the specified layer. Data takes the form of a 2-dimensional resource.