Search Results for

    Show / Hide Table of Contents

    Class DX11Texture

    Represents a DirectX Texture.

    Inheritance
    object
    GraphicsResource
    Texture
    DX11Texture
    Implements
    ILoadable
    IDependencyObject
    Inherited Members
    Texture.Id
    Texture.Description
    Texture.ReaderVersion
    Texture.Invalidated
    Texture.Dependencies
    Texture.Sampler
    Texture.CouldBeAttachedToFramebuffer
    Texture.Invalidate(ILoadable)
    Texture.ReleaseUnusedMemory()
    GraphicsResource.Context
    GraphicsResource.Disposed
    GraphicsResource.Dispose()
    GraphicsResource.Dispose(bool)
    Namespace: Evergine.DirectX11
    Assembly: Evergine.DirectX11.dll
    Syntax
    public class DX11Texture : Texture, ILoadable, IDependencyObject

    Constructors

    DX11Texture(DX11GraphicsContext, DataBox[], ref TextureDescription, ref SamplerStateDescription)

    Initializes a new instance of the DX11Texture class.

    Declaration
    public DX11Texture(DX11GraphicsContext context, DataBox[] data, ref TextureDescription description, ref SamplerStateDescription samplerState)
    Parameters
    Type Name Description
    DX11GraphicsContext context

    The graphics context.

    DataBox[] data

    The data pointer.

    TextureDescription description

    The texture description.

    SamplerStateDescription samplerState

    The sampler state description for this texture.

    Fields

    NativeTexture

    The instance of the DirectX texture.

    Declaration
    public ID3D11Resource NativeTexture
    Field Value
    Type Description
    ID3D11Resource

    Properties

    Name

    Gets or sets a string identifying this instance. Can be used in graphics debugger tools.

    Declaration
    public override string Name { get; set; }
    Property Value
    Type Description
    string
    Overrides
    Texture.Name

    NativePointer

    Gets the native pointer.

    Declaration
    public override nint NativePointer { get; }
    Property Value
    Type Description
    nint
    Overrides
    GraphicsResource.NativePointer

    ShaderResourceView

    Gets the shader resource view.

    Declaration
    public ID3D11ShaderResourceView ShaderResourceView { get; }
    Property Value
    Type Description
    ID3D11ShaderResourceView

    UnorderedAccessView

    Gets the unordered view.

    Declaration
    public ID3D11UnorderedAccessView UnorderedAccessView { get; }
    Property Value
    Type Description
    ID3D11UnorderedAccessView

    Methods

    CopyTo(ID3D11DeviceContext, uint, uint, uint, uint, uint, Texture, uint, uint, uint, uint, uint, uint, uint, uint, uint)

    Copies a pixel region from the source to the destination texture.

    Declaration
    public void CopyTo(ID3D11DeviceContext deviceContext, uint sourceX, uint sourceY, uint sourceZ, uint sourceMipLevel, uint sourceBaseArray, Texture destination, uint destinationX, uint destinationY, uint destinationZ, uint destinationMipLevel, uint destinationBasedArray, uint width, uint height, uint depth, uint layerCount)
    Parameters
    Type Name Description
    ID3D11DeviceContext deviceContext

    Graphics context.

    uint sourceX

    U coordinate of the source texture.

    uint sourceY

    V coordinate of the source texture.

    uint sourceZ

    W coordinate of the source texture.

    uint sourceMipLevel

    Source mip level.

    uint sourceBaseArray

    Source array index.

    Texture destination

    Destination texture.

    uint destinationX

    U coordinate of the destination texture.

    uint destinationY

    V coordinate of the destination texture.

    uint destinationZ

    W coordinate of the destination texture.

    uint destinationMipLevel

    Destination mip level.

    uint destinationBasedArray

    Destination array index.

    uint width

    Destination width.

    uint height

    Destination height.

    uint depth

    Destination depth.

    uint layerCount

    Destination layer count.

    Destroy()

    Destroy graphics native resources.

    Declaration
    protected override void Destroy()
    Overrides
    Texture.Destroy()

    FromDirectXTexture(DX11GraphicsContext, nint, TextureDescription?)

    Generates a DXTexture from a DirectX Texture2D pointer.

    Declaration
    public static DX11Texture FromDirectXTexture(DX11GraphicsContext context, nint texturePointer, TextureDescription? textureDescription = null)
    Parameters
    Type Name Description
    DX11GraphicsContext context

    DX context.

    nint texturePointer

    DirectX Texture pointer.

    TextureDescription? textureDescription

    Overridden pixel format. This only affects the generated TextureDescription. It does not change the source texture format.

    Returns
    Type Description
    DX11Texture

    DXTexture with SharpDXTexture as a resource.

    FromDirectXTexture(DX11GraphicsContext, ID3D11Texture2D, TextureDescription?)

    Generates a DXTexture from a Vortice Texture2D.

    Declaration
    public static DX11Texture FromDirectXTexture(DX11GraphicsContext context, ID3D11Texture2D vorticeTexture, TextureDescription? textureDescription = null)
    Parameters
    Type Name Description
    DX11GraphicsContext context

    DX context.

    ID3D11Texture2D vorticeTexture

    SharpDXTexture instance.

    TextureDescription? textureDescription

    The texture description.

    Returns
    Type Description
    DX11Texture

    DXTexture with SharpDXTexture as the resource.

    GetDepthStencilView(uint, uint, uint)

    Creates a new DepthStencil view for this texture.

    Declaration
    public ID3D11DepthStencilView GetDepthStencilView(uint firstSlice, uint sliceCount, uint mipSlice)
    Parameters
    Type Name Description
    uint firstSlice

    The starting slice of the view range.

    uint sliceCount

    The number of slices in the view range.

    uint mipSlice

    The mipmap level in the view range.

    Returns
    Type Description
    ID3D11DepthStencilView

    A new DepthStencil view.

    GetRenderTargetView(uint, uint, uint)

    Creates a new RenderTargetView for this texture.

    Declaration
    public ID3D11RenderTargetView GetRenderTargetView(uint firstSlice, uint sliceCount, uint mipSlice)
    Parameters
    Type Name Description
    uint firstSlice

    The starting slice of the view range.

    uint sliceCount

    The number of slices in the view range.

    uint mipSlice

    The mipmap level in the view range.

    Returns
    Type Description
    ID3D11RenderTargetView

    A new RenderTargetView instance.

    GetShaderResourceView(uint, uint, uint)

    Creates a new ShaderResource view for this texture.

    Declaration
    public ID3D11ShaderResourceView GetShaderResourceView(uint firstSlice, uint sliceCount, uint mipSlice)
    Parameters
    Type Name Description
    uint firstSlice

    The starting slice of the view range.

    uint sliceCount

    The number of slices in the view range.

    uint mipSlice

    The mipmap level in the view range.

    Returns
    Type Description
    ID3D11ShaderResourceView

    A new ShaderResource view.

    GetUnorderedAccessView(uint, uint)

    Creates a new UnorderedAccessView for this texture.

    Declaration
    public ID3D11UnorderedAccessView GetUnorderedAccessView(uint arraySlice, uint mipSlice)
    Parameters
    Type Name Description
    uint arraySlice

    The slice in the view range.

    uint mipSlice

    The mipmap level in the view range.

    Returns
    Type Description
    ID3D11UnorderedAccessView

    A new UnorderedAccessView.

    SetData(ID3D11DeviceContext, nint, uint, uint)

    Fills the buffer from a pointer.

    Declaration
    public void SetData(ID3D11DeviceContext deviceContext, nint source, uint sourceSizeInBytes, uint subResource = 0)
    Parameters
    Type Name Description
    ID3D11DeviceContext deviceContext

    Device context.

    nint source

    The data pointer.

    uint sourceSizeInBytes

    The size in bytes.

    uint subResource

    The subresource index.

    ToStaging()

    Returns a new Buffer with ResourceUsage set to staging.

    Declaration
    public DX11Texture ToStaging()
    Returns
    Type Description
    DX11Texture

    New staging Buffer.

    Implements

    ILoadable
    IDependencyObject

    Extension Methods

    TextureExtension.SaveToFile(Texture, GraphicsContext, string)
    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX