Previous Next

D3DHAL_DP2VIEWPORTINFO

The D3DHAL_DP2VIEWPORTINFO structure is used to inform guard-band aware drivers of the view clipping rectangle. The clipping rectangle is specified by the members dwX, dwY, dwWidth and dwHeight.

typedef struct _D3DHAL_DP2VIEWPORTINFO {
    DWORD  dwX;
    DWORD  dwY;
    DWORD  dwWidth;
    DWORD  dwHeight;
} D3DHAL_DP2VIEWPORTINFO, *LPD3DHAL_DP2VIEWPORTINFO;

Members

dwX, dwY
Specify the location, in screen coordinates, of the upper-left corner of the sub-rectangle.
dwWidth, dwHeight
Specify the width and height, respectively, of the sub-rectangle where the application is rendering. These members are specified in screen coordinates.

Headers

Defined in d3dhal.h. Include d3dhal.h.

Comments

The D3dDrawPrimitives2 callback parses a D3DHAL_DP2VIEWPORTINFO structure from the command buffer and updates the driver's viewport description when D3DHAL_DP2COMMAND is set to D3DDP2OP_VIEWPORTINFO.

One D3DHAL_DP2VIEWPORTINFO structure follows the D3DHAL_DP2COMMAND structure in the command buffer.

The driver should update the viewport portion of its internal rendering context with the location and size values specified in this structure. The driver can use this information to perform guard band clipping.

Non-guard-band drivers should ignore and skip over these instructions and continue processing the rest of the command buffer.

See Also

D3DDP2OP_VIEWPORTINFO, D3dDrawPrimitives2, D3DHAL_DP2COMMAND