PFND3D10DDI_SETRENDERTARGETS callback function (d3d10umddi.h)

The SetRenderTargets callback function sets render target surfaces.

Syntax

PFND3D10DDI_SETRENDERTARGETS Pfnd3d10ddiSetrendertargets;

void Pfnd3d10ddiSetrendertargets(
  [in] D3D10DDI_HDEVICE unnamedParam1,
  [in] const D3D10DDI_HRENDERTARGETVIEW *unnamedParam2,
  [in] UINT NumViews,
  [in] UINT ClearSlots,
  [in] D3D10DDI_HDEPTHSTENCILVIEW unnamedParam5
)
{...}

Parameters

[in] unnamedParam1

hDevice: A handle to the display device (graphics context).

[in] unnamedParam2

phRenderTargetView: An array of handles to the render target view objects to set. Note that some handle values can be NULL.

[in] NumViews

: The number of elements in the array that phRenderTargetView specifies.

[in] ClearSlots

The number of render target slots after the number of slots that NumViews specifies to be set to NULL. This number represents the difference between the previous number of render target view objects (that is, when the Microsoft Direct3D runtime previously called SetRenderTargets) and the new number of render target view objects.

Note that the number that ClearTargets specifies is only an optimization aid because the user-mode display driver could calculate this number.

[in] unnamedParam5

hDepthStencilView: Handle to the depth stencil view.

Return value

None

Remarks

The driver can use the pfnSetErrorCb callback function to set an error code.

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

Although the NumViews 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 NumViews 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 NumViews parameter and the current call to SetRenderTargets passes a value of 4 in NumViews, 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 NumViews, 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

Requirement Value
Minimum supported client 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