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]. [Texture] 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]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture]. Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect]. Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region]. Returns an [Image] that is a copy of data from this [Texture]. [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 [Texture] has an alpha channel. The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]. Default flags. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant FLAG_FILTER] are enabled. Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. Repeats the texture (instead of clamp to edge). Uses a magnifying filter, to enable smooth zooming in of the texture. 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. Converts the texture to the sRGB color space. Repeats the texture with alternate sections mirrored. Texture is a video surface.