PFND3D10DDI_SETSCISSORRECTS callback function (d3d10umddi.h)
The SetScissorRects function marks portions of render targets that rendering is confined to.
Syntax
PFND3D10DDI_SETSCISSORRECTS Pfnd3d10ddiSetscissorrects;
void Pfnd3d10ddiSetscissorrects(
D3D10DDI_HDEVICE unnamedParam1,
[in] UINT NumRects,
[in] UINT ClearRects,
const D3D10_DDI_RECT *unnamedParam4
)
{...}
Parameters
unnamedParam1
hDevice [in]
A handle to the display device (graphics context).
[in] NumRects
The total number of render-target portions that the pRects parameter specifies.
[in] ClearRects
The number of render-target portions after the number of render-target portions that NumScissorRects specifies to be set to NULL. This number represents the difference between the previous number of render-target portions (that is, when the Microsoft Direct3D runtime previously called SetScissorRects) and the new number of render-target portions.
Note that the number that ClearScissorRects specifies is only an optimization aid because the user-mode display driver could calculate this number.
unnamedParam4
pRects [in]
An array of RECT structures for the render-target portions to mark.
Return value
None
Remarks
The driver can use the pfnSetErrorCb callback function to set an error code.
The D3D10_DDI_RECT structure is defined as a RECT structure.
typedef RECT D3D10_DDI_RECT;
The user-mode display driver must set all render-target portions atomically as one operation.
Although the NumScissorRects parameter specifies the number of render-target portions in the array that the pRects parameter specifies, some values in the array can be NULL.
The range of render-target portions between the number that NumScissorRects specifies and the maximum number of render-target portions that are allowed is required to contain all NULL or unbound values. The number that the ClearScissorRects parameter specifies informs the driver about how many render-target portions the driver must clear out for the current atomic operation.
If the previous call to SetScissorRects passed a value of 2 in the NumScissorRects parameter and the current call to SetScissorRects passes a value of 4 in NumScissorRects, the current call to SetScissorRects also passes a value of 0 in the ClearScissorRects parameter. If the next successive call to SetScissorRects passes a value of 1 in NumScissorRects, the successive call also passes a value of 3 (4 - 1) in ClearScissorRects.
When the value of clear render-target portions is requested during user-mode query operations, the value is the difference between the maximum number of render-target portions and the render-target portions 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 SetScissorRects (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) |