Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: DirectX Version  (Read 3572 times)

0 Members and 1 Guest are viewing this topic.

Derrek3D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • View Profile
DirectX Version
« on: February 08, 2008, 03:22:13 PM »

Does anyone know what is the proper way to ask Windows if the correct DirectX version is installed (I'm referring to the version that the Direct3D 9 version of WME uses)? It's for a game launcher in C++ that I'm writing to help the user with the DirectX issue.

Also, I'm testing my game on a machine with DirectX 10 installed and my game won't run (it requests D3DX9_34.dll). Will the user need to install DirectX 9 Instead in order to run my game?

Thanks.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: DirectX Version
« Reply #1 on: February 08, 2008, 03:55:52 PM »

You will find some sample code in DirectX SDK. But the problem is, the D3DX library usually changes with each new version of DirectX SDK, so checking if the user has DirectX 9 installed doesn't necessarily ensure they have the correct D3DX library. It's sad, but it's the Microsoft way.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: DirectX Version
« Reply #2 on: February 08, 2008, 06:09:15 PM »

Also, DX10 & DX9 seem to really confuse everyone. Even in Vista you need both versions installed to run DX9 games. DX10 redistributable package doesn't contain DX9_xx libraries. As Mnemonic said, it's the microsoft way.
Logged
fl*p

Derrek3D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • View Profile
Re: DirectX Version
« Reply #3 on: February 11, 2008, 08:20:18 PM »

Ok, that's confusing, all right...

So what is the recommended course of action here? Do I ask the user at the end of the installation whether he would like to install the latest DirectX 9 - without even checking if he has it installed already, and let him decide?

And another question, wouldn't a DirectX 9 installation damage in some way an existing DirectX 10 installation? Is that tested? Has anyone tested and confirmed that games using DirectX 10 still work after installing the additional DirectX 9?
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: DirectX Version
« Reply #4 on: February 11, 2008, 08:40:01 PM »

You can check the directX version during the installation but I'm not familiar with the methods (either by using the windows API is some way - I'm no programmer - or by using some build-in function of the installer you have chosen).

DirectX 9 & 10 are designed to work together as they have different dll names. Actually, Vista by default have both installed as they are both needed. DX10 libraries can't replace DX9.
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: DirectX Version
« Reply #5 on: February 11, 2008, 10:49:23 PM »

If you're going to distribute DX setup with your game anyway, I'd recommend invoking it as a part of the installation. Or you might check if the D3DX DLL is present (just try to load it via LoadLibrary API function) and if it's not, run the DX installer. You should be able to script this in InnoSetup.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.017 seconds with 20 queries.