PFND3D10DDI_SETRENDERTARGETS callback function

The SetRenderTargets function sets render target surfaces.

Syntax

PFND3D10DDI_SETRENDERTARGETS Pfnd3d10ddiSetrendertargets;

void Pfnd3d10ddiSetrendertargets(
  D3D10DDI_HDEVICE Arg1,
  CONST D3D10DDI_HRENDERTARGETVIEW *,
  UINT NumViews,
  UINT ClearSlots,
  D3D10DDI_HDEPTHSTENCILVIEW Arg2
)
{...}

Parameters

Arg1

*

NumViews

ClearSlots

Arg2

Return Value

None

The driver can use the pfnSetErrorCb callback function to set an error code. For more information about setting error codes, see the following Remarks section.

Remarks

The user-mode display driver must set all render target surfaces and the depth stencil buffer atomically as one operation.

Although the RTargets parameter specifies the number of handles in the array that the phRenderTargetView parameter specifies, some handle values in the array can be NULL.

The range of render target surfaces between the number that RTargets specifies and the maximum number of render target surfaces that are allowed is required to contain all NULL or unbound values. The number that the ClearTargets parameter specifies informs the driver about how many bind points the driver must clear out for the current atomic operation.

If the previous call to SetRenderTargets passed a value of 2 in the RTargets parameter and the current call to SetRenderTargets passes a value of 4 in RTargets, the current call to SetRenderTargets also passes a value of 0 in the ClearTargets parameter. If the next successive call to SetRenderTargets passes a value of 1 in RTargets, the successive call also passes a value of 3 (4 - 1) in ClearTargets.

When the value of clear targets is requested during user-mode query operations, the value is the difference between the maximum number of render target surfaces and the render targets value.

The driver should not encounter any error, except for D3DDDIERR_DEVICEREMOVED. Therefore, if the driver passes any error, except for D3DDDIERR_DEVICEREMOVED, in a call to the pfnSetErrorCb function, the Microsoft Direct3D runtime will determine that the error is critical. Even if the device was removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if device removal interfered with the operation of SetRenderTargets (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Requirements

   
Windows version Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3d10umddi.h (include D3d10umddi.h)

See Also

D3D10DDI_DEVICEFUNCS

pfnSetErrorCb