Sign in to follow this  
HolyOdin

How to Obtain the dx version in D3D??

Recommended Posts

Is there anyone know how to Obtain the dx version using D3D? I guess maybe it will be stored in D3DADAPTER_IDENTIFIER9,but I can't find any parameter relate with it... thanks for helping!

Share this post


Link to post
Share on other sites
Hi, From the SDK it says this....



D3DXCheckVersion
Verify that the version of D3DX you compiled with is the version that you are running.

BOOL D3DXCheckVersion(
UINT D3DSDKVersion,
UINT D3DXSDKVersion
);
Parameters
D3DSDKVersion
[in] Use D3D_SDK_VERSION. See remarks.
D3DXSDKVersion
[in] Use D3DX_SDK_VERSION. See remarks.
Return Values
Returns TRUE if the version of D3DX you compiled against is the version you are running with; otherwise, FALSE is returned.

Remarks
Use this function during the initialization of your application like this:

HRESULT CD3DXMyApplication::Initialize(HINSTANCE hInstance,
LPCSTR szWindowName, LPCSTR szClassName, UINT uWidth, UINT uHeight)
{
HRESULT hr;

if (!D3DXCheckVersion(D3D_SDK_VERSION, D3DX_SDK_VERSION))
return E_FAIL;

...




Share this post


Link to post
Share on other sites
Thanks ankhd !
but I didn't describe My question clearly yesterday.Actually,what I want to do is obtain the MAX DX version that the current display adapter will support rather than the DX version had installed in my system...

Share this post


Link to post
Share on other sites
the first thing to do it's to detect if you can use Direct3D10
If yes, then all D3D9 version are ok.
You have just to include DXUT.h and call DXUTDoesAppSupportD3D10() that will return true or false.

About the Direct3D9 version, you should check this values in
D3DAdapterIdentifier9


LARGE_INTEGER DriverVersion;
DWORD DriverVersionLowPart;
DWORD DriverVersionHighPart;


Share this post


Link to post
Share on other sites
Quote:
Original post by XVincentX
the first thing to do it's to detect if you can use Direct3D10
If yes, then all D3D9 version are ok.
You have just to include DXUT.h and call DXUTDoesAppSupportD3D10() that will return true or false.

About the Direct3D9 version, you should check this values in
D3DAdapterIdentifier9


LARGE_INTEGER DriverVersion;
DWORD DriverVersionLowPart;
DWORD DriverVersionHighPart;


I managed to solve the problem by following your instruction,thanks a lot!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this