diff options
Diffstat (limited to 'doc/classes/ImageTexture.xml')
-rw-r--r-- | doc/classes/ImageTexture.xml | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 5fef56e354..435fec6a50 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -32,39 +32,30 @@ </tutorials> <methods> <method name="create_from_image"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> <description> Initializes the texture by allocating and setting the data from an [Image]. </description> </method> <method name="get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> + <return type="int" enum="Image.Format" /> <description> Returns the format of the texture, one of [enum Image.Format]. </description> </method> <method name="set_size_override"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2" /> <description> Resizes the texture to the specified dimensions. </description> </method> <method name="update"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="immediate" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> <description> - Replaces the texture's data with a new [Image]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call. + Replaces the texture's data with a new [Image]. [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method. Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. </description> |