.net - Find out DirectX Version -


how can detect if directx version on windows 7 machine 11 or 11.1 ?

preferably using .net language maybe via pinvoke or sharpdx?

just try create device specific feature level (along other parameters).

  • in native code (use 1 of d3d11createdevice* functions) . if function not succeed - feature level not supported. make easier, pass array of feature levels, , then, if device not nullptr, can check 1 highest supported:

    const d3d_feature_level arrfeatlevels[] =  {     d3d_feature_level_11_1,      d3d_feature_level_11_0,     d3d_feature_level_10_1,      d3d_feature_level_10_0,     d3d_feature_level_9_3,      d3d_feature_level_9_2,     d3d_feature_level_9_1,  };  const unsigned int nfeatlevels = _countof(arrfeatlevels);  d3d11createdeviceandswapchain(..., arrfeatlevels, nfeatlevels, ...,                                     &m_device, &featurelevel, &m_context); if (m_device && m_context) {     featurelevel // can access highest supported feature level here 
  • in sharpdx need use constructor, accepts specific feature levels:

    device(drivertype, devicecreationflags, featurelevel[]) 

    if device creation succeeded, check device.featurelevel property.

happy coding!

edit

i think misinterpret question. asked detecting of version supported os, not os + graphics card + driver together. maximum supported version preinstalled os, need know os on:

os version                      version of dx runtime  windows vista                   directx 10 windows vista sp1/sp2           directx 10.1 windows vista sp2               directx 11.0 windows 7                       directx 11.0 windows 7 sp1                   directx 11.0 windows 7 sp1 kb2670838    directx 11.1 windows 8 / windows rt          directx 11.1 windows 8.1 / windows rt        directx 11.2 

sources:

you can query version of d3d11.dll , compare on wiki page. see:


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -