Antialiasing problem with D3D9

Started by
2 comments, last by MJP 14 years, 2 months ago
Hello, I have written an app that draws in 4 windows on 4 different screens, and I want to use antialiasing (multisampling) on the windows. The 4 screens are driven by 2 video boards (test config is nVidia 7600GS (pcie) and FX 5200 (pci)). I created 4 windows and test the devices capabilities to determine the backbuffer format and the multisampling level available. Then I set the values I get in a D3DPRESENT_PARAMETERS structure (for the config above, I detected D3DMULTISAMPLE_4_SAMPLES to be available for both cards, with quality parameter = 1. The program work perfectly without antialiasing, but setting d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES and d3dpp.MultiSampleQuality = 1 causes the CreateDevice call to fail with error 0x8876086c. The same program, on my laptop with 1 nvidia GeForce 9300M GS works perfectly with 8 samples multisampling. Is there a possibility that the capabilities are not reported correctly by the "CheckDeviceMultiSampleType" that I use to probe the cards capabilities ? Oliver
Advertisement
Enable the debug runtimes, it should give you more details on why your call is failing. Also you can translate the HRESULT codes into readable text with functions like DXGetErrorDescription and DXGetErrorString.

I would try setting the quality level to 0. Non-zero quality levels correspond to device-specific MSAA modes, such as Nvidia's CSAA modes on the 8-series and up. Also remember that if CheckDeviceMultiSampleType returns a value of 1 for pQualityLevels, that means that the only value you can use is 0.
Hi Matt !

Wonderful, you solved it. Setting quality to 0 allows me to set the antialiasing on.

It seems that CheckDeviceMultiSampleType always report a quality level 1 unit higher than what you can set. On the Nvidia 9300 GS, it reports a quality level of 3, and only level 2 or below can be used.
Quote:Original post by oliver_mpt
It seems that CheckDeviceMultiSampleType always report a quality level 1 unit higher than what you can set. On the Nvidia 9300 GS, it reports a quality level of 3, and only level 2 or below can be used.


Right, because it's telling you the number of quality modes and not the max quality mode.

This topic is closed to new replies.

Advertisement