Original Post
Hi i've got a problem with the CheckDeviceMultiSampleType-methode. I want to check if my device is able to 4x MS.
ZeroMemory(&d3dpp, sizeof(d3dpp));
D3DDISPLAYMODE d3ddm;
d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm);
if(SUCCEEDED(d3d->CheckDeviceMultiSampleType( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL
, d3ddm.Format, true, D3DMULTISAMPLE_4_SAMPLES, NULL)))
{
d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES;
}
The problem is, this check never succedes. But if i do it without the check it works fine and the object is displayd with 4x MS. So why doesn't the check succeed? I also tested this way:
DWORD qualy;
ZeroMemory(&d3dpp, sizeof(d3dpp));
D3DDISPLAYMODE d3ddm;
d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm);
if(SUCCEEDED(d3d->CheckDeviceMultiSampleType( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL
, d3ddm.Format, true, D3DMULTISAMPLE_NONMASKABLE, &qualy)))
{
d3dpp.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
d3dpp.MultiSampleQuality = qualy;
}
but it also didn't work. Can sombody tell me what i'm doeing wrong? Thanks