Jump to content
  • Advertisement
  • entries
  • comments
  • views

D3DX tribulations

Sign in to follow this  


I've been led down a rathole the past couple of weeks. First, I updated to Visual Studio 2015 (from VS2012), for reasons that I now don't remember at all. So, after I recompiled TotAW I decided I'd better check that it worked again. No problem.

But, then I decided I would check if things worked OK on Windows 7. Microsoft provides a nice sample of virtual machines for testing (mainly for Internet Explorer, but fine for my purposes): https://developer.microsoft.com/en-us/microsoft-edge/ I downloaded a win32 version of Windows 7, and got it working, after a few struggles, with VMWare Fusion. I downloaded the new version of TotAW, and ran the installer.

As an aside, for both compatibility reasons, and because the code is several years old, TotAW uses DirectX9, from back in the Windows XP days. In fact, TotAW theoretically still works on Windows XP, though it's been some time since I've actually tried it. DirectX9 still works fine with modern Windows. However, as part of this code, I also rely on a library of code D3DX, which is theoretically part of DirectX9 but doesn't go along with the main DirectX9, and has to be installed separately. D3DX hasn't been updated since 2010, and has been marked as deprecated for years. Through the years I've been slowly removing the usage of D3DX, but there are still key parts of the engine (mainly in the UI rendering) that still us it.

So, running the installer on my clean Windows 7 virtual machine, the installer _seems_ fine. However, the installer checks for the existence of DirectX9 (specifically the D3DX parts), and then directs the user to the Microsoft website to run the web installer. The first bad sign is that the "permalink" to the DirectX9 runtime installer no longer points to the installer, instead taking the user to a "upgrade to Windows 10" page. However, I eventually find the right link, run the installer, which "succeeds". However, upon completion, I run TotAW, which fails, because of missing D3DX. Oops. I don't think Microsoft cares too much about D3DX anymore.

This has led me down the path to finally remove usage of D3DX from my code. I'm replacing it with SDL, which I plan to use to load textures and render fonts. I've written a test app or two, and SDL does everything I need, though actually swapping it in is not trivial. More on that next time.

Sign in to follow this  

1 Comment

Recommended Comments

I personally just ship the relevant D3DX DLL inside my exe directory now. Microsoft have no objection to this, I read somewhere. Obviously means won't be updated with fixes, but seems highly unlikely any patches for decades-old D3DX DLLs are going to be released now.

Share this comment

Link to comment

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!