Search Results for

    Show / Hide Table of Contents

    Struct GPUTextureDescription

    A common description for all GPU textures.

    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Textures/GPUTextureDescription.h
    Syntax
    public struct GPUTextureDescription

    Fields

    ArraySize

    Number of textures in array for Texture Arrays.

    Declaration
    public int32 ArraySize
    Field Value
    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 int32 Depth
    Field Value
    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 int32 Height
    Field Value
    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 int32 MipLevels
    Field Value
    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 GPUResourceUsage.Default; see GPUResourceUsage for all possible values.

    Declaration
    public GPUResourceUsage Usage
    Field Value
    GPUResourceUsage

    Width

    Texture width (in texels).

    Declaration
    public int32 Width
    Field Value
    int32

    Methods

    Clear()

    Declaration
    public void Clear()

    Equals(const GPUTextureDescription& other)

    Declaration
    public bool Equals(const GPUTextureDescription& other) const
    Parameters
    GPUTextureDescription other

    Returns
    bool

    HasPerMipViews()

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

    Declaration
    public bool HasPerMipViews() const
    Returns
    bool

    HasPerSliceViews()

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

    Declaration
    public bool HasPerSliceViews() const
    Returns
    bool

    IsArray()

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

    Declaration
    public bool IsArray() const
    Returns
    bool

    IsCubeMap()

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

    Declaration
    public bool IsCubeMap() const
    Returns
    bool

    IsDepthStencil()

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

    Declaration
    public bool IsDepthStencil() const
    Returns
    bool

    IsMultiSample()

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

    Declaration
    public bool IsMultiSample() const
    Returns
    bool

    IsRenderTarget()

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

    Declaration
    public bool IsRenderTarget() const
    Returns
    bool

    IsShaderResource()

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

    Declaration
    public bool IsShaderResource() const
    Returns
    bool

    IsUnorderedAccess()

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

    Declaration
    public bool IsUnorderedAccess() const
    Returns
    bool

    IsVolume()

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

    Declaration
    public bool IsVolume() const
    Returns
    bool

    New1D(int32 width, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)

    Creates a new 1D GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New1D(int32 width, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)
    Parameters
    int32 width

    The width.

    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.

    int32 arraySize

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

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New1D(int32 width, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize)

    Creates a new 1D GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New1D(int32 width, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize)
    Parameters
    int32 width

    The width.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    int32 mipCount

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

    int32 arraySize

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

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New1D(int32 width, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)

    Creates a new 1D GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New1D(int32 width, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)
    Parameters
    int32 width

    The width.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    int32 arraySize

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

    Returns
    GPUTextureDescription

    A new instance of 1D GPUTextureDescription class.

    New2D(int32 width, int32 height, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1, MSAALevel msaaLevel=MSAALevel::None)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New2D(int32 width, int32 height, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1, MSAALevel msaaLevel=MSAALevel::None)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    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.

    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 width, int32 height, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize, MSAALevel msaaLevel=MSAALevel::None)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New2D(int32 width, int32 height, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount, int32 arraySize, MSAALevel msaaLevel=MSAALevel::None)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    int32 mipCount

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

    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 width, int32 height, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New2D(int32 width, int32 height, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget, int32 arraySize=1)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    int32 arraySize

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

    Returns
    GPUTextureDescription

    A new instance of GPUTextureDescription class.

    New3D(const Float3& size, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New3D(const Float3& size, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)
    Parameters
    Float3 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 width, int32 height, int32 depth, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New3D(int32 width, int32 height, int32 depth, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    int32 depth

    The depth.

    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.

    New3D(int32 width, int32 height, int32 depth, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount)

    Creates a new GPUTextureDescription.

    Declaration
    public static GPUTextureDescription New3D(int32 width, int32 height, int32 depth, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    int32 depth

    The depth.

    PixelFormat format

    Describes the format to use.

    GPUTextureFlags textureFlags

    true if the texture needs to support unordered read write.

    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 width, int32 height, int32 depth, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)

    Creates a new GPUTextureDescription with a single mipmap.

    Declaration
    public static GPUTextureDescription New3D(int32 width, int32 height, int32 depth, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    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.

    NewCube(int32 size, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int32 size, int32 mipCount, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)
    Parameters
    int32 size

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

    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.

    NewCube(int32 size, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int32 size, PixelFormat format, GPUTextureFlags textureFlags, int32 mipCount)
    Parameters
    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.

    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 size, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)

    Creates a new Cube GPUTextureDescription.

    Declaration
    public static GPUTextureDescription NewCube(int32 size, PixelFormat format, GPUTextureFlags textureFlags=GPUTextureFlags::ShaderResource|GPUTextureFlags::RenderTarget)
    Parameters
    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.

    operator!=(const GPUTextureDescription& other)

    Declaration
    public bool operator!=(const GPUTextureDescription& other) const
    Parameters
    GPUTextureDescription other

    Returns
    bool

    operator==(const GPUTextureDescription& other)

    Declaration
    public bool operator==(const GPUTextureDescription& other) const
    Parameters
    GPUTextureDescription other

    Returns
    bool

    ToStaging()

    Declaration
    public GPUTextureDescription ToStaging() const
    Returns
    GPUTextureDescription

    ToStagingReadback()

    Declaration
    public GPUTextureDescription ToStagingReadback() const
    Returns
    GPUTextureDescription

    ToStagingUpload()

    Declaration
    public GPUTextureDescription ToStagingUpload() const
    Returns
    GPUTextureDescription

    ToString()

    Declaration
    public String ToString() const
    Returns
    String

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat