Skip to content

Commit dea3269

Browse files
committed
Merge pull request godotengine#107172 from clayjohn/docs-texture-create
Clarify the data param in the docs for RD.texture_create
2 parents a29e66e + 2ef28a1 commit dea3269

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/classes/RenderingDevice.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@
918918
<description>
919919
Creates a new texture. It can be accessed with the RID that is returned.
920920
Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.
921+
[b]Note:[/b] [param data] takes an [Array] of [PackedByteArray]s. For [constant TEXTURE_TYPE_1D], [constant TEXTURE_TYPE_2D], and [constant TEXTURE_TYPE_3D] types, this array should only have one element, a [PackedByteArray] containing all the data for the texture. For [code]_ARRAY[/code] and [code]_CUBE[/code] types, the length should be the same as the number of [member RDTextureFormat.array_layers] in [param format].
921922
[b]Note:[/b] Not to be confused with [method RenderingServer.texture_2d_create], which creates the Godot-specific [Texture2D] resource as opposed to the graphics API's own texture type.
922923
</description>
923924
</method>

0 commit comments

Comments
 (0)