Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
TextureLayered¶
Inherits: Resource < Reference < Object
Inherited By: Texture3D, TextureArray
Clase base para tipos de texturas 3D.
Descripción¶
Base class for Texture3D and TextureArray. Cannot be used directly, but contains all the functions necessary for accessing and using Texture3D and TextureArray. Data is set on a per-layer basis. For Texture3Ds, 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.
Propiedades¶
|
||
|
Métodos¶
get_depth ( ) const |
|
get_format ( ) const |
|
get_height ( ) const |
|
get_layer_data ( int layer ) const |
|
get_width ( ) const |
|
void |
set_data_partial ( Image image, int x_offset, int y_offset, int layer, int mipmap=0 ) |
void |
set_layer_data ( Image image, int layer ) |
Enumeraciones¶
enum Flags:
FLAGS_DEFAULT_TEXTURE_ARRAY = 7 --- Default flags for TextureArray. FLAG_MIPMAPS, FLAG_REPEAT and FLAG_FILTER are enabled.
FLAGS_DEFAULT_TEXTURE_3D = 4 --- Default flags for Texture3D. FLAG_FILTER 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.
Descripciones de Propiedades¶
Dictionary data
Default |
|
Returns a dictionary with all the data used by this texture.
int flags
Default |
|
Setter |
set_flags(value) |
Getter |
get_flags() |
Specifies which Flags apply to this texture.
Descripciones de Métodos¶
int get_depth ( ) const
Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
Format get_format ( ) const
Devuelve el formato actual que está siendo usado por esta textura. Ver Format para más detalles.
int get_height ( ) const
Devuelve la altura de la textura. La altura está típicamente representada por el eje Y.
Devuelve un recurso de Image con los datos de la layer
especificada.
int get_width ( ) const
Devuelve el ancho de la textura. El ancho es típicamente representado por el eje X.
Partially sets the data for a specified layer
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.
Sets the data for the specified layer. Data takes the form of a 2-dimensional Image resource.