Search Results for

    Show / Hide Table of Contents

    Class TextureData

    Texture data container (used to keep data downloaded from the GPU).

    Inheritance
    System.Object
    Object
    TextureData
    Inherited Members
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class TextureData : Object

    Constructors

    TextureData()

    Initializes a new instance of the TextureData.

    Declaration
    public TextureData()

    Properties

    ArraySize

    Gets amount of texture slices in the array.

    Declaration
    [Unmanaged]
    public int ArraySize { get; }
    Property Value
    System.Int32

    Depth

    Top level texture surface depth (in pixels).

    Declaration
    [Unmanaged]
    public int Depth { get; }
    Property Value
    System.Int32

    Format

    The texture data format.

    Declaration
    [Unmanaged]
    public PixelFormat Format { get; }
    Property Value
    PixelFormat

    Height

    Top level texture surface height (in pixels).

    Declaration
    [Unmanaged]
    public int Height { get; }
    Property Value
    System.Int32

    MipLevels

    Gets amount of mip maps in the texture.

    Declaration
    [Unmanaged]
    public int MipLevels { get; }
    Property Value
    System.Int32

    Width

    Top level texture surface width (in pixels).

    Declaration
    [Unmanaged]
    public int Width { get; }
    Property Value
    System.Int32

    Methods

    Clear()

    Clear allocated memory.

    Declaration
    [Unmanaged]
    public void Clear()

    GetPixels(out Color[], Int32, Int32)

    Gets the texture pixels as Color array.

    Declaration
    [Unmanaged]
    public bool GetPixels(out Color[] pixels, int mipIndex = 0, int arrayIndex = 0)
    Parameters
    Color[] pixels

    The result texture pixels array.

    System.Int32 mipIndex

    The mip index (zero-based).

    System.Int32 arrayIndex

    The array or depth slice index (zero-based).

    Returns
    System.Boolean

    True if failed, otherwise false.

    Remarks

    Supported only for 'basic' texture formats (uncompressed, single plane).

    GetPixels(out Color32[], Int32, Int32)

    Gets the texture pixels as Color32 array.

    Declaration
    [Unmanaged]
    public bool GetPixels(out Color32[] pixels, int mipIndex = 0, int arrayIndex = 0)
    Parameters
    Color32[] pixels

    The result texture pixels array.

    System.Int32 mipIndex

    The mip index (zero-based).

    System.Int32 arrayIndex

    The array or depth slice index (zero-based).

    Returns
    System.Boolean

    True if failed, otherwise false.

    Remarks

    Supported only for 'basic' texture formats (uncompressed, single plane).

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat