Well ive tryed to make some Antialiasing with DirectX
My app is fullscreen.
....................................................
....................................................
....................................................
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = FALSE;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferWidth = 640;
d3dpp.BackBufferHeight = 480;
d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
d3dpp.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES;
d3dpp.MultiSampleQuality = 1;
g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice );
If I add those
bolded lines in my code,
before Creating the Device the app crashes. If I add those lines
after the Creation of Device nothing happens !!
I also did
g_pd3dDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS ,1);
Whats wrong? Why i cant use Antialiasing ? Because no matter how much samples i use the aliasing is the same :(
Thanks..