2018-08-20 22:35:30 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-08-05 16:51:38 +00:00
<class name= "TextureLayered" inherits= "Resource" version= "3.6" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2018-08-20 22:35:30 +00:00
<brief_description >
2020-01-26 05:59:51 +00:00
Base class for 3D texture types.
2018-08-20 22:35:30 +00:00
</brief_description>
<description >
2020-09-18 12:09:51 +00:00
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 [Texture3D]s, the layer specifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for [TextureArray]s, the layer specifies the array layer.
2018-08-20 22:35:30 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_depth" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "get_format" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" enum= "Image.Format" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Returns the current format being used by this texture. See [enum Image.Format] for details.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "get_height" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Returns the height of the texture. Height is typically represented by the Y-axis.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "get_layer_data" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Image" />
<argument index= "0" name= "layer" type= "int" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Returns an [Image] resource with the data from specified [code]layer[/code].
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "get_width" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Returns the width of the texture. Width is typically represented by the X-axis.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "set_data_partial" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "image" type= "Image" />
<argument index= "1" name= "x_offset" type= "int" />
<argument index= "2" name= "y_offset" type= "int" />
<argument index= "3" name= "layer" type= "int" />
<argument index= "4" name= "mipmap" type= "int" default= "0" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Partially sets the data for a specified [code]layer[/code] by overwriting using the data of the specified [code]image[/code]. [code]x_offset[/code] and [code]y_offset[/code] determine where the [Image] is "stamped" over the texture. The [code]image[/code] must fit within the texture.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "set_layer_data" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "image" type= "Image" />
<argument index= "1" name= "layer" type= "int" />
2018-08-20 22:35:30 +00:00
<description >
2020-02-04 20:25:02 +00:00
Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource.
2018-08-20 22:35:30 +00:00
</description>
</method>
</methods>
<members >
2021-08-08 17:55:31 +00:00
<member name= "data" type= "Dictionary" setter= "_set_data" getter= "_get_data" default= "{"depth": 0,"flags": 7,"format": 37,"height": 0,"layers": [ ],"width": 0}" >
2020-02-04 20:25:02 +00:00
Returns a dictionary with all the data used by this texture.
2018-08-20 22:35:30 +00:00
</member>
2021-08-08 17:55:31 +00:00
<member name= "flags" type= "int" setter= "set_flags" getter= "get_flags" default= "7" >
2020-02-04 20:25:02 +00:00
Specifies which [enum Flags] apply to this texture.
2018-08-20 22:35:30 +00:00
</member>
</members>
<constants >
2021-08-08 17:55:31 +00:00
<constant name= "FLAGS_DEFAULT_TEXTURE_ARRAY" value= "7" enum= "Flags" >
Default flags for [TextureArray]. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant FLAG_FILTER] are enabled.
</constant>
<constant name= "FLAGS_DEFAULT_TEXTURE_3D" value= "4" enum= "Flags" >
Default flags for [Texture3D]. [constant FLAG_FILTER] is enabled.
</constant>
2018-08-20 22:35:30 +00:00
<constant name= "FLAG_MIPMAPS" value= "1" enum= "Flags" >
2020-02-04 20:25:02 +00:00
Texture will generate mipmaps on creation.
2018-08-20 22:35:30 +00:00
</constant>
<constant name= "FLAG_REPEAT" value= "2" enum= "Flags" >
2020-02-04 20:25:02 +00:00
Texture will repeat when UV used is outside the 0-1 range.
2018-08-20 22:35:30 +00:00
</constant>
<constant name= "FLAG_FILTER" value= "4" enum= "Flags" >
2020-02-04 20:25:02 +00:00
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.
2018-08-20 22:35:30 +00:00
</constant>
2021-08-08 17:55:31 +00:00
<constant name= "FLAG_ANISOTROPIC_FILTER" value= "8" enum= "Flags" >
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.
2018-08-20 22:35:30 +00:00
</constant>
</constants>
</class>