Texture for 2D and 3D.
    public abstract class Texture : Resource

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 GD.Load(string).

Inheritance Chain

Derived Classes

Properties

    public uint Flags { get; set; }

The texture’s flags.

Methods

    public void Draw(RID canvasItem, Vector2 position, Color? modulate = default(Color?), bool transpose = false, Texture normalMap = null)

    public void DrawRect(RID canvasItem, Rect2 rect, bool tile, Color? modulate = default(Color?), bool transpose = false, Texture normalMap = null)

    public void DrawRectRegion(RID canvasItem, Rect2 rect, Rect2 srcRect, Color? modulate = default(Color?), bool transpose = false, Texture normalMap = null, bool clipUv = true)

    public Image GetData()

    [Obsolete("GetFlags is deprecated. Use the Flags property instead.")]
    public uint GetFlags()

    public int GetHeight()

Returns the texture height.

    public Vector2 GetSize()

Returns the texture size.

    public int GetWidth()

Returns the texture width.

    public bool HasAlpha()

    [Obsolete("SetFlags is deprecated. Use the Flags property instead.")]
    public void SetFlags(uint flags)

Inner Types

FlagsEnum

Name Value Description
Default    
Mipmaps    
Repeat    
Filter    
AnisotropicFilter    
ConvertToLinear    
MirroredRepeat    
VideoSurface    
Tags: