Occlusion Queries in managed DirectX
Before you create a query, you can check to see if the runtime supports queries by calling IDirect3DDevice9::CreateQuery with a NULL pointer like this:
IDirect3DQuery9* pEventQuery; // Create a device pointer m_pd3dDevice // Create a query object HRESULT hr = m_pd3dDevice->CreateQuery(D3DQUERYTYPE_EVENT, NULL); |
However, in Managed DirectX, there is no comparable method to call. The only way to create a query is to create a new Query object like the following:
Query q = new Query(device, QueryType.Event);
Will this throw an exception if the device does not support the query, or is there another way to do this? I've been searching for quite some time to find somewhere that says how to check if a device supports a query in managed DirectX, but I haven't had any luck yet. Thanks for your help.

