Overlay DDI Programming Considerations

This section applies only to Windows 7 and later, and Windows Server 2008 R2 and later versions of Windows operating system.

When you implement the Overlay DDI in your user-mode display driver, you should consider the following programming tips:

  • If the driver supports the Overlay DDI, it must set the D3DCAPS_OVERLAY bit in the Caps member of D3DCAPS9 structure. The D3DCAPS9 structure is described in the DirectX 9.0 SDK documentation. The driver sets the D3DCAPS_OVERLAY bit in response to a call to its GetCaps function in which the D3DDDICAPS_GETD3D9CAPS value is set in the Type member of the D3DDDIARG_GETCAPS structure that the pData parameter points to.

  • When the display format is 64 bits rather than 32 bits (for example, when the DWM uses the D3DDDIFMT_A16B16G16R16F value from the D3DDDIFORMAT enumeration for the display mode), the Direct3D runtime places the low 32 bits of the overlay color key in the DstColorKeyLow member of the D3DDDI_OVERLAYINFO structure and the upper 32 bits in the DstColorKeyHigh member of D3DDDI_OVERLAYINFO.