Search Results for

    Show / Hide Table of Contents

    Class TextureView

    A view into a texture. The main characteristics of a TextureView are:

    1. TextureViews can reference a subrange within a texture.
    2. TextureViews allow reinterpreting the data in a texture with a different PixelFormat, as long as the formats are compatible.
    3. TextureViews tell us the structure of the texture data (1D, 2D, 3D, cubemap, array, etc.).
    4. TextureViews are used to bind textures to the pipeline, as most APIs require a view to bind a texture, instead of binding the texture directly.
    Inheritance
    object
    GraphicsResource
    TextureView
    Inherited Members
    GraphicsResource.Context
    GraphicsResource.NativePointer
    GraphicsResource.Disposed
    GraphicsResource.Dispose()
    GraphicsResource.Dispose(bool)
    GraphicsResource.Destroy()
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public abstract class TextureView : GraphicsResource

    Constructors

    TextureView(Texture, PixelFormat, uint, uint, uint, uint, TextureType?)

    Initializes a new instance of the TextureView class.

    Declaration
    protected TextureView(Texture texture, PixelFormat pixelFormat = PixelFormat.Unknown, uint baseMip = 0, uint mipCount = 4294967295, uint baseLayer = 0, uint layerCount = 4294967295, TextureType? viewType = null)
    Parameters
    Type Name Description
    Texture texture

    The associated Texture.

    PixelFormat pixelFormat

    The PixelFormat of the view. This may be different from the texture's PixelFormat, as some APIs allow creating views with a different format, as long as they are compatible. If null, the view will use the texture's PixelFormat.

    uint baseMip

    First mip level index of this texture view.

    uint mipCount

    Number of mip levels in this texture view.

    uint baseLayer

    First array layer index of this texture view.

    uint layerCount

    Number of array layers in this texture view.

    TextureType? viewType

    The type of the TextureView. If null, the view type will be inferred from the texture's description and the other parameters (baseMip, mipCount, baseLayer, layerCount).

    Fields

    BaseLayer

    First array layer index of this texture view.

    Declaration
    public readonly uint BaseLayer
    Field Value
    Type Description
    uint

    BaseMip

    First mip level index of this texture view.

    Declaration
    public readonly uint BaseMip
    Field Value
    Type Description
    uint

    LayerCount

    Number of array layers in this texture view.

    Declaration
    public readonly uint LayerCount
    Field Value
    Type Description
    uint

    MipCount

    Number of mip levels in this texture view.

    Declaration
    public readonly uint MipCount
    Field Value
    Type Description
    uint

    PixelFormat

    The PixelFormat of the view. This may be different from the texture's PixelFormat, as some APIs allow creating views with a different format, as long as they are compatible.

    Declaration
    public readonly PixelFormat PixelFormat
    Field Value
    Type Description
    PixelFormat

    Texture

    The associated texture.

    Declaration
    public readonly Texture Texture
    Field Value
    Type Description
    Texture

    ViewType

    The type of the TextureView.

    Declaration
    public readonly TextureType ViewType
    Field Value
    Type Description
    TextureType

    Properties

    Description

    Gets the description of the underlying Texture.

    Declaration
    public TextureDescription Description { get; }
    Property Value
    Type Description
    TextureDescription

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX