> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_RENDER_TARGET_VIEW_DESC

> Describes the subresources from a resource that are accessible by using a render-target view.

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

## Syntax

```cpp theme={null}
typedef struct D3D12_RENDER_TARGET_VIEW_DESC
{
    DXGI_FORMAT Format;
    D3D12_RTV_DIMENSION ViewDimension;
    D3D12_BUFFER_RTV Buffer;
    D3D12_TEX1D_RTV Texture1D;
    D3D12_TEX1D_ARRAY_RTV Texture1DArray;
    D3D12_TEX2D_RTV Texture2D;
    D3D12_TEX2D_ARRAY_RTV Texture2DArray;
    D3D12_TEX2DMS_RTV Texture2DMS;
    D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray;
    D3D12_TEX3D_RTV Texture3D;
} D3D12_RENDER_TARGET_VIEW_DESC
```

### Members

*Format*\
Type: DXGI\_FORMAT

A [DXGI\_FORMAT](https://learn.microsoft.com/en-us/windows/desktop/api/dxgiformat/ne-dxgiformat-dxgi_format)-typed value that specifies the viewing format.

*ViewDimension*\
Type: D3D12\_RTV\_DIMENSION

A [D3D12\_RTV\_DIMENSION](/reference/graphics/d3d12/enums/d3d12_rtv_dimension_public)-typed value that specifies how the render-target resource will be accessed. This type specifies how the resource will be accessed. This member also determines which \_RTV to use in the following union.

*Buffer*\
Type: D3D12\_BUFFER\_RTV

A [D3D12\_BUFFER\_RTV](/reference/graphics/d3d12/structs/d3d12_buffer_rtv_public) structure that specifies which buffer elements can be accessed.

*Texture1D*\
Type: D3D12\_TEX1D\_RTV

A [D3D12\_TEX1D\_RTV](/reference/graphics/d3d12/structs/d3d12_tex1d_rtv_public) structure that specifies the subresources in a 1D texture that can be accessed.

*Texture1DArray*\
Type: D3D12\_TEX1D\_ARRAY\_RTV

A [D3D12\_TEX1D\_ARRAY\_RTV](/reference/graphics/d3d12/structs/d3d12_tex1d_array_rtv_public) structure that specifies the subresources in a 1D texture array that can be accessed.

*Texture2D*\
Type: D3D12\_TEX2D\_RTV

A [D3D12\_TEX2D\_RTV](/reference/graphics/d3d12/structs/d3d12_tex2d_rtv_public) structure that specifies the subresources in a 2D texture that can be accessed.

*Texture2DArray*\
Type: D3D12\_TEX2D\_ARRAY\_RTV

A [D3D12\_TEX2D\_ARRAY\_RTV](/reference/graphics/d3d12/structs/d3d12_tex2d_array_rtv_public) structure that specifies the subresources in a 2D texture array that can be accessed.

*Texture2DMS*\
Type: D3D12\_TEX2DMS\_RTV

A [D3D12\_TEX2DMS\_RTV](/reference/graphics/d3d12/structs/d3d12_tex2dms_rtv_public) structure that specifies a single subresource because a multisampled 2D texture only contains one subresource.

*Texture2DMSArray*\
Type: D3D12\_TEX2DMS\_ARRAY\_RTV

A [D3D12\_TEX2DMS\_ARRAY\_RTV](/reference/graphics/d3d12/structs/d3d12_tex2dms_array_rtv_public) structure that specifies the subresources in a multisampled 2D texture array that can be accessed.

*Texture3D*\
Type: D3D12\_TEX3D\_RTV

A [D3D12\_TEX3D\_RTV](/reference/graphics/d3d12/structs/d3d12_tex3d_rtv_public) structure that specifies subresources in a 3D texture that can be accessed.

## Remarks

Pass a render-target-view description into [ID3D12Device::CreateRenderTargetView](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createrendertargetview_public) to create a render-target view.

A render-target view can't use the following formats:

<ul>
  <li>Any typeless format.</li>
  <li>DXGI\_FORMAT\_R32G32B32 if the view will be used to bind a buffer (vertex, index, constant, or stream-output).</li>
</ul>

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:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [CreateRenderTargetView](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createrendertargetview_public.md)
- [D3D12_BUFFER_RTV](/reference/graphics/d3d12/structs/d3d12_buffer_rtv_public.md)
- [D3D12_RTV_DIMENSION](/reference/graphics/d3d12/enums/d3d12_rtv_dimension_public.md)
- [D3D12_TEX3D_RTV](/reference/graphics/d3d12/structs/d3d12_tex3d_rtv_public.md)
- [D3D12_TEX2D_RTV](/reference/graphics/d3d12/structs/d3d12_tex2d_rtv_public.md)
