An occlusion query returns the number of pixels that pass z-testing. These pixels are for primitives drawn between the issue of D3DISSUE_BEGIN and D3DISSUE_END. This enables an application to check the occlusion result against 0. Zero is "fully occluded," which means the pixels are not visible from the current camera position.

Remarks

QuertyType

Valid issue flag

GetData buffer

Runtime

Implicit beginning of query

D3DQUERYTYPE_VCACHE

D3DISSUE_END

D3DDEVINFO_VCACHE

Retail/Debug

CreateDevice()

D3DQUERYTYPE_RESOURCEMANAGER

D3DISSUE_END

D3DDEVINFO_RESOURCEMANAGER

Debug only

Present()

D3DQUERYTYPE_VERTEXSTATS

D3DISSUE_END

D3DDEVINFO_D3DVERTEXSTATS

Debug only

Present()

D3DQUERYTYPE_EVENT

D3DISSUE_END

BOOL

Retail/Debug

CreateDevice()

D3DQUERYTYPE_OCCLUSION

D3DISSUE_BEGIN, D3DISSUE_END

DWORD

Retail/Debug

N/A

For a D3DQUERYTYPE_RESOURCEMANAGER query, the device behavior flags must include D3DCREATE_DISABLE_DRIVER_MANAGEMENT.