Microsoft DirectX 8.0 (Visual Basic) |
Determines if a multisampling technique is available on this device.
object.CheckDeviceMultiSampleType( _ Adapter As Long, _ DeviceType As CONST_D3DDEVTYPE, _ Format As CONST_D3DFORMAT, _ Windowed As Long, _ MultiSampleType As CONST_D3DMULTISAMPLE_TYPE) As Long
If the device can perform the specified multisampling method, this method returns D3D_OK.
If the method fails, one of the following values can be returned.
D3DERR_INVALIDCALL |
D3DERR_INVALIDDEVICE |
D3DERR_NOTAVAILABLE |
This method is intended for use with both render target and depth-stencil surfaces because you need to create both of them multisampled if you want to use them together.
The following code fragment shows how you could use CheckDeviceMultiSampleType to test for devices that support a specific multisampling method.
Dim Device As Direct3DDevice8 Dim Caps As D3DCAPS8 Dim Caps2 As CONST_D3DDEVTYPE Dim Mode As CONST_D3DFORMAT If Device.CheckDeviceMultiSampleType(Caps.AdapterOrdinal, Caps2.DeviceType, _ Mode.Format, False, D3DMULTISAMPLE_3_SAMPLES) Then ' things to do if D3DMULTISAMPLE_3_SAMPLES works in full screen mode ' with the specified surface format End If
Err.Number is not set for this method.