c - How to find best MSAA level available in DXUT's ModifyDeviceSettings function -


i'd pick decent msaa level in modifydevicesettings callback of dxut (d3d11) function, there's no device pointer available call checkmultisamplequalitylevels.

the dxut function dxutgetd3d11device returns null @ point in init. there number of d3d9 samples want, rely on old dxutget3dobject (or whatever) call return live device pointer, don't in d3d11.

if stuff "4" pdevicesettings->d3d11.sd.sampledesc.count works, , if pick big of number revert 1, i'd pick best available not higher 4.

does know how can enumerate available multisample levels in dxut framework , pick 1 feel best?

first, make sure using latest dxut direct3d11 github.

dxut enumerates msaa information part of support settings dialogs in cd3d11enumdevicesettingscombo members multisamplecountlist , multisamplequalitylist.

that said, samples want enable msaa 4x 'by default' do:

bool callback modifydevicesettings( dxutdevicesettings* pdevicesettings,     void* pusercontext ) {     static bool s_bfirsttime = true;     if( s_bfirsttime )     {         // enable 4xmsaa default         dxgi_sample_desc msaa4xsampledesc = { 4, 0 };         pdevicesettings->d3d11.sd.sampledesc = msaa4xsampledesc;     }      return true; }  

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -