those that support D3DMULTISAMPLE_X_SAMPLES or D3DMULTISAMPLE_NONMASKABLE like mine... Radeon 9000 IGP.
CVideoDirectX9.cpp after these lines:
D3DDEVTYPE devtype = D3DDEVTYPE_HAL;
#ifdef _IRR_D3D_SHADER_DEBUGGING
devtype = D3DDEVTYPE_REF;
#endif
you put:
Code: Select all
// check antialias capability for multisample_nonmaskable or //multisample_2_samples
DWORD quality;
bool antialias = false;
if( SUCCEEDED(pID3D->CheckDeviceMultiSampleType( D3DADAPTER_DEFAULT,
devtype , d3ddm.Format, present.Windowed,
D3DMULTISAMPLE_NONMASKABLE, &quality ) ) )
{
present.SwapEffect = D3DSWAPEFFECT_DISCARD;
present.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
present.MultiSampleQuality = quality - 1; //return value star in 0
antialias = true;
}
else if( SUCCEEDED(pID3D->CheckDeviceMultiSampleType( D3DADAPTER_DEFAULT,
devtype , d3ddm.Format, present.Windowed,
D3DMULTISAMPLE_2_SAMPLES, NULL ) ) )//2 can be 4....
{
present.SwapEffect = D3DSWAPEFFECT_DISCARD;
present.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES;
antialias = true;
}
else
{
os::Printer::log("Device dont support 2 antialias samples or multisample nonmaskable.", ELL_WARNING);
}
// get caps
pID3DDevice->GetDeviceCaps(&Caps);
we put:
Code: Select all
//enable antialias
if(antialias)
{
pID3DDevice->SetRenderState( D3DRS_MULTISAMPLEANTIALIAS , TRUE);
}
I hope that be usefull