DirectX Graphics API Reference

ID3D11Texture3D

Represents a 3D texture resource.

Syntax


interface ID3D11Texture3D : public ID3D11Texture2D 
{
    virtual HRESULT STDMETHODCALLTYPE Map(
        UINT Subresource,
        D3D11_MAP MapType,
        UINT Flags,
        D3D11_MAPPED_SUBRESOURCE *pMappedResource
        ) = 0;

    virtual void STDMETHODCALLTYPE Unmap(
        UINT Subresource
        ) = 0;

    virtual void STDMETHODCALLTYPE GetDesc(
        D3D11_TEXTURE3D_DESC *pDesc
        ) = 0;
};
            

Remarks

A 3D texture resource is a texture with depth. It is represented by the ID3D11Texture3D interface. This interface inherits from ID3D11Texture2D, providing access to the standard methods for mapping, unmapping, and retrieving the description of the texture.

You can create a 3D texture by calling ID3D11Device::CreateTexture3D. The parameters for texture creation are specified by the D3D11_TEXTURE3D_DESC structure.

A 3D texture can be used for various purposes, including volumetric data storage, texture filtering, and certain types of computational shaders.

Methods

Method Description
Map Maps a CPU-accessible subresource into the application's address space.
Unmap Unmaps a previously mapped subresource.
GetDesc Get the texture description.

Inherited Members

ID3D11Texture3D inherits the following methods from ID3D11Texture2D:

Map

Maps a CPU-accessible subresource into the application's address space.


virtual HRESULT STDMETHODCALLTYPE Map(
    UINT Subresource,
    D3D11_MAP MapType,
    UINT Flags,
    D3D11_MAPPED_SUBRESOURCE *pMappedResource
    ) = 0;
            

Parameters

Unmap

Unmaps a previously mapped subresource.


virtual void STDMETHODCALLTYPE Unmap(
    UINT Subresource
    ) = 0;
            

Parameters

GetDesc

Get the texture description.


virtual void STDMETHODCALLTYPE GetDesc(
    D3D11_TEXTURE3D_DESC *pDesc
    ) = 0;
            

Parameters

Note on Inheritance

ID3D11Texture3D inherits from ID3D11Texture2D, which in turn inherits from ID3D11Resource. This means that methods like Map, Unmap, and GetDesc are actually defined in ID3D11Resource and are accessible through ID3D11Texture3D.