Solved

How do I check version of DX supported by hardware?

Posted on 2011-03-04
7
607 Views
Last Modified: 2012-05-11
Hi experts,

How do I check (in VC++) the versions of D3D/DX supported by the graphics hardware on the current system?

Thanks
0
Comment
Question by:chrispauljarram
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 35036768
Do you have the DirectX SDK loaded?  There is sample code in there.
In the V9 SDK it was something like
\Program Files\Microsoft DirectX 9.0 SDK (October 2004)\Samples\C++\Misc\GetDXVer
0
 
LVL 12

Assisted Solution

by:mwochnick
mwochnick earned 100 total points
ID: 35036797
I found this post on an SDK example, don't have the sdk on my current computer
http://www.programmersheaven.com/2/FAQ-DIRECTX-Understand-Version-Programmatically

To determine the DirectX version programmatically there is a sample Application in the "DXSDK\Samples\C++\Misc\GetDXVer" folder. It first checks the DirectX version using DxDiag. If it can't find out the version it simply checks each file version. The return type of the "GetDXVersion" function will be a DWord indicating the version.
0
 

Author Comment

by:chrispauljarram
ID: 35039271
Hi,

Sure - but won't that just give the DX version installed in Windows? (e.g. in Win7 it's always DX11).  I need to know the capabilities of the current graphics card without having to create a D3D device and look for a fail (i.e. is dx10, dx10.1 or dx11 the max DX ver supported by the hardware?...)

Cheers,
Chris
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 35039793
0
 

Author Comment

by:chrispauljarram
ID: 35045923
Hi Martin,

Not quite no - GetDeviceCaps is a D3D9 concept used to check the capabilities of a D3D9 device.  I need to be able to determine the max version of DX supported by a card (i.e. is it 9,10,10.1 or 11?), without having to actually try and create the device itself.

Sorry for the late response, Experts-exchange have decided I no longer need to be emailed when responses to my questions are posted!  (not a single email for any of the 3 responses above).

Thanks,
Chris
0
 
LVL 10

Accepted Solution

by:
Martin_J_Parker earned 400 total points
ID: 35056708
There did seem to be some sort of maintenance going on this morning as I couldn't get into EE first thing - your response problems could be linked to that.

So you need a way of interrogating the graphics card's device driver to see what version is supported by the card.  I don't have a DX10 or DX11 compatible card available to me at the moment - but I'm wondering how much of that information might be squirrelled away in the registry somewhere - may be worth a regedit search to see what you can find on your system.

You might be able to get some information through .NET 4.0 - you seem to be able to check if hardware is at least DX9 capable - but I don't know if it's enough for your purposes:
http://msdn.microsoft.com/en-us/library/ms742196.aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.rendercapability.aspx
0
 

Author Closing Comment

by:chrispauljarram
ID: 35087093
.
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question