Texture for 2D and 3D.
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
Textures are often created by loading them from a file. See [method @GDScript.load].
[Texture2D] is a base for other resources. It cannot be used directly.
Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code].
Draws the texture using a [CanvasItem] with the [VisualServer] API.
Draws a part of the texture using a [CanvasItem] with the [VisualServer] API.
Returns an [Image] with the data from this [Texture2D]. [Image]s can be accessed and manipulated directly.
Returns the texture height.
Returns the texture size.
Returns the texture width.
Returns [code]true[/code] if this [Texture2D] has an alpha channel.