I am Initializing directx in this way:
[source lang="cpp"] D3DPRESENT_PARAMETERS d3dpp;
LPDIRECT3D9 g_pD3D = NULL;
if( NULL == ( g_pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )
return false;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = true;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.BackBufferCount = 1;
d3dpp.MultiSampleQuality = 0;
d3dpp.hDeviceWindow = hwnd;
d3dpp.EnableAutoDepthStencil = true;
d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8;
d3dpp.Flags = 0;
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
d3dpp.MultiSampleType = D3DMULTISAMPLE_8_SAMPLES;
//d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &g_D3DDevice ) ) )[/source]
Now how can I change after initialization my settings (for example MultiSampleType)? Sorry for stupid question.
Changing settings after initialization
Before you can reset DirectX9 device you need to release all buffers, textures, shaders, etc (unless they're created using MANAGED pool), otherwise Reset() call will fail.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement