TextureLayered

    Inherited By: Texture3D,

    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:

    • FLAGS_DEFAULT_TEXTURE_3D = 4 —- Default flags for Texture3D. is enabled.

    • FLAG_MIPMAPS = 1 —- Texture will generate mipmaps on creation.

    • 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.

    • FLAG_ANISOTROPIC_FILTER = 8 —- Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios.

    This results in better-looking textures when viewed from oblique angles.

    • data

    Returns a dictionary with all the data used by this texture.


    Specifies which Flags apply to this texture.

    Method Descriptions

    • int get_depth ( ) const

    Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).


    • get_format ( ) const

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


    • get_height ( ) const

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


    • Image get_layer_data ( layer ) const

    Returns an Image resource with the data from specified layer.


    • get_width ( ) const

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


    • void set_data_partial ( Image image, x_offset, int y_offset, layer, int mipmap=0 )

    Partially sets the data for a specified layer by overwriting using the data of the specified . x_offset and y_offset determine where the is “stamped” over the texture. The must fit within the texture.