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.

Inheritance Chain

Derived Classes

Properties

    public int 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()

    public int GetFlags()

Getter for Flags

    public int GetHeight()

Return the texture height.

    public Vector2 GetSize()

Return the texture size.

    public int GetWidth()

Return the texture width.

    public bool HasAlpha()

    public void SetFlags(int flags)

Setter for Flags

Inner Types

FlagsEnum

Name Value Description
sDefault 7 Default flags. Generate mipmaps, repeat, and filter are enabled.
Mipmaps    
Repeat    
Filter    
AnisotropicFilter    
ConvertToLinear    
MirroredRepeat    
VideoSurface    
Tags: