DXGI_SWAP_CHAIN_DESC sd; sd.BufferDesc.Width = cxClient_; sd.BufferDesc.Height = cyClient_; sd.BufferDesc.RefreshRate.Numerator = 60; sd.BufferDesc.RefreshRate.Denominator = 1; sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; sd.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; sd.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; // No multisampling. sd.SampleDesc.Count = 1; sd.SampleDesc.Quality = 0;The other is before CreateDepthStencilView()
D3D10_TEXTURE2D_DESC depthStencilDesc;[/size] [size=4] depthStencilDesc.Width = cxClient; depthStencilDesc.Height = cyClient; depthStencilDesc.MipLevels = 1; depthStencilDesc.ArraySize = 1; depthStencilDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; depthStencilDesc.SampleDesc.Count = 1; // multisampling must match depthStencilDesc.SampleDesc.Quality = 0; // swap chain values. depthStencilDesc.Usage = D3D10_USAGE_DEFAULT; depthStencilDesc.BindFlags = D3D10_BIND_DEPTH_STENCIL; depthStencilDesc.CPUAccessFlags = 0; depthStencilDesc.MiscFlags = 0;[/size] [size=4]
Whenever I change the count and quality to any value pairs other than (1,0), my app crashes.
I search the web for answers but find no helpful methods. Some methods may be obselete as they use old D3D APIs.






