Search Results for

    Show / Hide Table of Contents

    Class GPUTextureDescription

    A common description for all GPU textures.

    Inheritance
    System.Object
    GPUTextureDescription
    Implements
    System.IEquatable<GPUTextureDescription>
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public sealed class GPUTextureDescription : ValueType, IEquatable<GPUTextureDescription>

    Fields

    ArraySize

    Number of textures in array for Texture Arrays.

    Declaration
    public int ArraySize
    Field Value
    System.Int32

    DefaultClearColor

    Default clear color for render targets

    Declaration
    public Color DefaultClearColor
    Field Value
    Color

    Depth

    Texture depth (in texels) for Volume Textures.

    Declaration
    public int Depth
    Field Value
    System.Int32

    Dimensions

    The dimensions of the texture.

    Declaration
    public TextureDimensions Dimensions
    Field Value
    TextureDimensions

    Flags

    Flags (see GPUTextureFlags) for binding to pipeline stages. The flags can be combined by a logical OR.

    Declaration
    public GPUTextureFlags Flags
    Field Value
    GPUTextureFlags

    Format

    Texture format (see PixelFormat).

    Declaration
    public PixelFormat Format
    Field Value
    PixelFormat

    Height

    Texture height (in texels).

    Declaration
    public int Height
    Field Value
    System.Int32

    MipLevels

    The maximum number of mipmap levels in the texture. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.

    Declaration
    public int MipLevels
    Field Value
    System.Int32

    MultiSampleLevel

    Structure that specifies multisampling parameters for the texture.

    Declaration
    public MSAALevel MultiSampleLevel
    Field Value
    MSAALevel

    Usage

    Value that identifies how the texture is to be read from and written to. The most common value is Default; see GPUResourceUsage for all possible values.

    Declaration
    public GPUResourceUsage Usage
    Field Value
    GPUResourceUsage

    Width

    Texture width (in texels).

    Declaration
    public int Width
    Field Value
    System.Int32

    Properties

    Default

    The default GPUTextureDescription.

    Declaration
    public static GPUTextureDescription Default { get; }
    Property Value
    GPUTextureDescription

    HasPerMipViews

    Gets a value indicating whether this instance has per mip level handles.

    Declaration
    public bool HasPerMipViews { get; }
    Property Value
    System.Boolean

    HasPerSliceViews

    Gets a value indicating whether this instance has per slice views.

    Declaration
    public bool HasPerSliceViews { get; }
    Property Value
    System.Boolean

    IsArray

    Gets a value indicating whether this instance is an array texture.

    Declaration
    public bool IsArray { get; }
    Property Value
    System.Boolean

    IsCubeMap

    Gets a value indicating whether this instance is a cubemap texture.

    Declaration
    public bool IsCubeMap { get; }
    Property Value
    System.Boolean

    IsDepthStencil

    Gets a value indicating whether this instance is a depth stencil.

    Declaration
    public bool IsDepthStencil { get; }
    Property Value
    System.Boolean

    IsMultiSample

    Gets a value indicating whether this instance is a multi sample texture.

    Declaration
    public bool IsMultiSample { get; }
    Property Value
    System.Boolean

    IsRenderTarget

    Gets a value indicating whether this instance is a render target.

    Declaration
    public bool IsRenderTarget { get; }
    Property Value
    System.Boolean

    IsShaderResource

    Gets a value indicating whether this instance is a shader resource.

    Declaration
    public bool IsShaderResource { get; }
    Property Value
    System.Boolean

    IsUnorderedAccess

    Gets a value indicating whether this instance is a unordered access.

    Declaration
    public bool IsUnorderedAccess { get; }
    Property Value
    System.Boolean

    IsVolume

    Gets a value indicating whether this instance is a volume texture.

    Declaration
    public bool IsVolume { get; }
    Property Value
    System.Boolean

    Methods

    Clear()

    Clears description.

    Declaration
    public void Clear()

    Equals(GPUTextureDescription)

    Declaration
    public bool Equals(GPUTextureDescription other)
    Parameters
    GPUTextureDescription other

    Returns
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    System.Object obj

    Returns
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    System.Int32

    New1D(Int32, PixelFormat, GPUTextureFlags, Int32)

    Creates a new 1D GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New1D(int width, PixelFormat format, GPUTextureFlags textureFlags, int arraySize = 1)
    Parameters
    System.Int32 width

    The width.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New1D(Int32, PixelFormat, GPUTextureFlags, Int32, Int32)

    Creates a new 1D GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New1D(int width, PixelFormat format, GPUTextureFlags textureFlags, int mipCount, int arraySize)
    Parameters
    System.Int32 width

    The width.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New1D(Int32, Int32, PixelFormat, GPUTextureFlags, Int32)

    Creates a new 1D GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New1D(int width, int mipCount, PixelFormat format, GPUTextureFlags textureFlags, int arraySize = 1)
    Parameters
    System.Int32 width

    The width.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New2D(Int32, Int32, PixelFormat, GPUTextureFlags, Int32)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New2D(int width, int height, PixelFormat format, GPUTextureFlags textureFlags, int arraySize = 1)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New2D(Int32, Int32, PixelFormat, GPUTextureFlags, Int32, Int32, MSAALevel)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New2D(int width, int height, PixelFormat format, GPUTextureFlags textureFlags, int mipCount, int arraySize, MSAALevel msaaLevel)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    MSAALevel msaaLevel

    The MSAA Level.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New2D(Int32, Int32, Int32, PixelFormat, GPUTextureFlags, Int32, MSAALevel)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New2D(int width, int height, int mipCount, PixelFormat format, GPUTextureFlags textureFlags, int arraySize = 1, MSAALevel msaaLevel)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    MSAALevel msaaLevel

    The MSAA Level.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New3D(Vector3, PixelFormat, GPUTextureFlags)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New3D(Vector3 size, PixelFormat format, GPUTextureFlags textureFlags)
    Parameters
    Vector3 size

    The size (width, height and depth).

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New3D(Int32, Int32, Int32, PixelFormat, GPUTextureFlags)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New3D(int width, int height, int depth, PixelFormat format, GPUTextureFlags textureFlags)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 depth

    The depth.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New3D(Int32, Int32, Int32, PixelFormat, GPUTextureFlags, Int32)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New3D(int width, int height, int depth, PixelFormat format, GPUTextureFlags textureFlags, int mipCount)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 depth

    The depth.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New3D(Int32, Int32, Int32, Int32, PixelFormat, GPUTextureFlags)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New3D(int width, int height, int depth, int mipCount, PixelFormat format, GPUTextureFlags textureFlags)
    Parameters
    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 depth

    The depth.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    NewCube(Int32, PixelFormat, GPUTextureFlags)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int size, PixelFormat format, GPUTextureFlags textureFlags)
    Parameters
    System.Int32 size

    The size (in pixels) of the top-level faces of the cube texture.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    The texture flags.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    NewCube(Int32, PixelFormat, GPUTextureFlags, Int32)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int size, PixelFormat format, GPUTextureFlags textureFlags, int mipCount)
    Parameters
    System.Int32 size

    The size (in pixels) of the top-level faces of the cube texture.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    The texture flags.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    NewCube(Int32, Int32, PixelFormat, GPUTextureFlags)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int size, int mipCount, PixelFormat format, GPUTextureFlags textureFlags)
    Parameters
    System.Int32 size

    The size (in pixels) of the top-level faces of the cube texture.

    System.Int32 mipCount

    Number of mipmaps for the texture. Default is 1. Use 0 to allocate full mip chain.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    The texture flags.

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    ToStaging()

    Gets the staging (CPU read/write) description for this instance.

    Declaration
    public GPUTextureDescription ToStaging()
    Returns
    GPUTextureDescription

    A staging texture description

    ToStagingReadback()

    Gets the staging readback (CPU read) description for this instance.

    Declaration
    public GPUTextureDescription ToStagingReadback()
    Returns
    GPUTextureDescription

    A staging texture description

    ToStagingUpload()

    Gets the staging upload (CPU write) description for this instance.

    Declaration
    public GPUTextureDescription ToStagingUpload()
    Returns
    GPUTextureDescription

    A staging texture description

    ToString()

    Declaration
    public override string ToString()
    Returns
    System.String

    Extension Methods

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