D3DX tribulations

Published July 11, 2016
Advertisement

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.

2 likes 1 comments

Comments

Aardvajk

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.

July 14, 2016 10:45 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement