D3D11_RENDER_TARGET_VIEW_DESC Structure

Specifies the subresources from a resource that are accessible using a render-target view.

Syntax

typedef struct D3D11_RENDER_TARGET_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D11_RTV_DIMENSION ViewDimension;
    union {
        D3D11_BUFFER_RTV Buffer;
        D3D11_TEX1D_RTV Texture1D;
        D3D11_TEX1D_ARRAY_RTV Texture1DArray;
        D3D11_TEX2D_RTV Texture2D;
        D3D11_TEX2D_ARRAY_RTV Texture2DArray;
        D3D11_TEX2DMS_RTV Texture2DMS;
        D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray;
        D3D11_TEX3D_RTV Texture3D;
    };
} D3D11_RENDER_TARGET_VIEW_DESC;  

Members

Format
The data format (see DXGI_FORMAT).

ViewDimension
The resource type (see D3D11_RTV_DIMENSION), which specifies how the render-target resource will be accessed.

Buffer
Specifies which buffer elements can be accessed (see D3D11_BUFFER_RTV).

Texture1D
Specifies the subresources in a 1D texture that can be accessed (see D3D11_TEX1D_RTV).

Texture1DArray
Specifies the subresources in a 1D texture array that can be accessed (see D3D11_TEX1D_ARRAY_RTV).

Texture2D
Specifies the subresources in a 2D texture that can be accessed (see D3D11_TEX2D_RTV).

Texture2DArray
Specifies the subresources in a 2D texture array that can be accessed (see D3D11_TEX2D_ARRAY_RTV).

Texture2DMS
Specifies a single subresource because a multisampled 2D texture only contains one subresource (see D3D11_TEX2DMS_RTV).

Texture2DMSArray
Specifies the subresources in a multisampled 2D texture array that can be accessed (see D3D11_TEX2DMS_ARRAY_RTV).

Texture3D
Specifies subresources in a 3D texture that can be accessed (see D3D11_TEX3D_RTV).

Remarks

A render-target-view description is passed into ID3D11Device::CreateRenderTargetView to create a render target.

A render-target-view cannot use the following formats:

If the format is set to DXGI_FORMAT_UNKNOWN, then the format of the resource that the view binds to the pipeline will be used.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).