ID3D11Device3::CreateRenderTargetView1 method

Creates a render-target view for accessing resource data.

Syntax


HRESULT CreateRenderTargetView1(
  [in]                  ID3D11Resource                 *pResource,
  [in, optional]  const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1,
  [out, optional]       ID3D11RenderTargetView1        **ppRTView1
);

Parameters

pResource [in]

Type: ID3D11Resource*

Pointer to a ID3D11Resource that represents a render target. This resource must have been created with the D3D11_BIND_RENDER_TARGET flag.

pDesc1 [in, optional]

Type: const D3D11_RENDER_TARGET_VIEW_DESC1*

Pointer to a D3D11_RENDER_TARGET_VIEW_DESC1 that represents a render-target view description. Set this parameter to NULL to create a view that accesses all of the subresources in mipmap level 0.

ppRTView1 [out, optional]

Type: ID3D11RenderTargetView1**

A pointer to a memory block that receives a pointer to a ID3D11RenderTargetView1 interface for the created render-target view. Set this parameter to NULL to validate the other input parameters (the method will return S_FALSE if the other input parameters pass validation).

Return value

Type: HRESULT

This method returns one of the Direct3D 11 Return Codes.

Remarks

A render-target view can be bound to the output-merger stage by calling ID3D11DeviceContext::OMSetRenderTargets.

Requirements

Minimum supported client

Windows 10 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

D3D11_3.h

Library

D3D11.lib

See also

ID3D11Device3

 

 

Show: