ID3D10Device::CreateRenderTargetView method

Create a render-target view for accessing resource data.

Syntax

HRESULT CreateRenderTargetView(
  ID3D10Resource                      *pResource,
  const D3D10_RENDER_TARGET_VIEW_DESC *pDesc,
  ID3D10RenderTargetView              **ppRTView
);

Parameters

pResource

Type: ID3D10Resource*

Pointer to the resource that will serve as the render target. This resource must have been created with the D3D10_BIND_RENDER_TARGET flag.

pDesc

Type: const D3D10_RENDER_TARGET_VIEW_DESC*

Pointer to a render-target-view description (see D3D10_RENDER_TARGET_VIEW_DESC). Set this parameter to NULL to create a view that accesses mipmap level 0 of the entire resource (using the format the resource was created with).

ppRTView

Type: ID3D10RenderTargetView**

Address of a pointer to an ID3D10RenderTargetView. 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 following Direct3D 10 Return Codes.

Remarks

A rendertarget view can be bound to the output merger stage by calling ID3D10Device::OMSetRenderTargets.

Requirements

   
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See Also

ID3D10Device Interface