Search Results for

    Show / Hide Table of Contents

    Class Texture

    Texture asset contains an image that is usually stored on a GPU and is used during rendering graphics.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    TextureBase
    Texture
    FontTextureAtlas
    Inherited Members
    TextureBase.MaxTextureSize
    TextureBase.MaxMipLevels
    TextureBase.MaxArraySize
    TextureBase.GetMipData(Int32, Int32, Int32)
    TextureBase.GetPixels(Color32[], Int32, Int32)
    TextureBase.GetPixels(Color[], Int32, Int32)
    TextureBase.SetPixels(Color32[], Int32, Int32, Boolean)
    TextureBase.SetPixels(Color[], Int32, Int32, Boolean)
    TextureBase.Init(TextureBase.InitData)
    TextureBase.Texture
    TextureBase.Format
    TextureBase.Width
    TextureBase.Height
    TextureBase.Size
    TextureBase.ArraySize
    TextureBase.MipLevels
    TextureBase.ResidentMipLevels
    TextureBase.CurrentMemoryUsage
    TextureBase.TotalMemoryUsage
    TextureBase.TextureGroup
    TextureBase.HasStreamingError
    BinaryAsset.Reimport()
    BinaryAsset.ImportPath
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    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 Texture : TextureBase

    Constructors

    Texture()

    Initializes a new instance of the Texture.

    Declaration
    public Texture()

    Properties

    IsNormalMap

    Returns true if texture is a normal map.

    Declaration
    [Unmanaged]
    public bool IsNormalMap { get; }
    Property Value
    System.Boolean

    Methods

    FromFile(String, Boolean)

    Loads the texture from the image file and creates the virtual texture asset for it. Supported file formats depend on a runtime platform. All platform support loading PNG, BMP, TGA, HDR and JPEG files.

    Declaration
    [Unmanaged]
    public static Texture FromFile(string path, bool generateMips = false)
    Parameters
    System.String path

    The source image file path.

    System.Boolean generateMips

    True if generate mipmaps for the imported texture.

    Returns
    Texture

    The loaded texture (virtual asset) or null if fails.

    LoadFile(String, Boolean)

    Loads the texture from the image file. Supported file formats depend on a runtime platform. All platform support loading PNG, BMP, TGA, HDR and JPEG files.

    Declaration
    [Unmanaged]
    public bool LoadFile(string path, bool generateMips = false)
    Parameters
    System.String path

    The source image file path.

    System.Boolean generateMips

    True if generate mipmaps for the imported texture.

    Returns
    System.Boolean

    True if fails, otherwise false.

    Remarks

    Valid only for virtual assets.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    • Constructors
      • Texture()
    • Properties
      • IsNormalMap
    • Methods
      • FromFile(String, Boolean)
      • LoadFile(String, Boolean)
    • Extension Methods
    Back to top Copyright © 2012-2024 Wojciech Figat