Determines if a multisampling technique is available on this device.
HRESULT CheckDeviceMultiSampleType( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels );
If the device can perform the specified multisampling method, this method returns D3D_OK. D3DERR_INVALIDCALL is returned if the Adapter or MultiSampleType parameters are invalid. This method returns D3DERR_NOTAVAILABLE if the queried multisampling technique is not supported by this device. D3DERR_INVALIDDEVICE is returned if DeviceType does not apply to this adapter.
This method is intended for use with both render-target and depth-stencil surfaces because you must create both surfaces multisampled if you want to use them together.
The following code fragment shows how you could use IDirect3D9::CheckDeviceMultiSampleType to test for devices that support a specific multisampling method.
if( SUCCEEDED(pD3D->CheckDeviceMultiSampleType( pCaps->AdapterOrdinal, pCaps->DeviceType, BackBufferFormat, FALSE, D3DMULTISAMPLE_3_SAMPLES, NULL ) ) && SUCCEEDED(pD3D->CheckDeviceMultiSampleType( pCaps->AdapterOrdinal, pCaps->DeviceType, DepthBufferFormat, FALSE, D3DMULTISAMPLE_3_SAMPLES, NULL ) ) ) return S_OK;
The preceding code will return S_OK if the device supports the full-screen D3DMULTISAMPLE_3_SAMPLES multisampling method with the surface format.
Header: Declared in D3d9.h.