DirectX7; a blast from the past

· by Steve · Read in about 3 min · (450 Words)

I’ve been catching up on a few of my TODO items, one of which is addressing a few remaining stability issues with the OGRE DirectX7 render system, a plugin which allows you to run OGRE on older computers running Win98 (which can’t run DirectX9) and with perhaps pretty dodgy drivers. It’s not been a priority for a while, since to attract new users it’s generally the newer tech that interests people, but at the same time having a solid solution for older computers makes it more useful for those targetting the shareware market. OGRE has plugins for DirectX9 and OpenGL for the higher end of the market (in theory the GL plugin can target these older machines too, but in practice manufacturers provided drivers that were so shoddy that it’s often not practical) and that’s where the focus is for future versions, but we do still support DirectX7 for the 1.0.x branch. We don’t support DirectX8, since it was a transition API version between fixed function and programmable hardware, and had several serious design flaws which luckily MS fixed in Dx9 but make engines designed around it fundamentally flawed going forward - hence IMO the complete rewrites many engines had to do to support full shader driven hardware.

Whilst DirectX7 is old and undeniably clunky in this day and age, working with it again wasn’t as painful as I expected. In fact, it was kind of quaint how simplified things were, when you didn’t have to worry about hardware buffers, shader extensions, and multiple other clever tricks that might have been applied - it really is quite basic. It’s never going to win any beauty awards, but it’s a simple old thing that plods on regardless without making much of a fuss. 😀

I thought I had resolved all the issues; I certainly had all surfaces restoring properly and reloading their content happily when it wasn’t before, but just before going to bed I spotted a remaining problem to do with exclusive mode access when switching between fullscreen and windowed. I will sort that out later, I think it’s a case of trapping it and reconstructing the exclusive mode screen surfaces when it happens rather that using the default restore behaviour.

We don’t officially support Dx7 in Dagon (OGRE 1.1.x) since the majority of the swanky new features won’t work in it, and people get confused because Dx7 doesn’t coem with MS’s SDKs anymore, but I think I will move it into ogreaddons once I’ve done this work, and at least get it functioning there so it will remain an option for people that want it. Judging by this trip through it, that shouldn’t be a very big job anyway.