Why Both D3D and OpenGL?

Started by
4 comments, last by OremLK 16 years, 6 months ago
I know that Doom 3 runs on Linux and Mac OS X, so I figured it must use OpenGL. When I installed it on Windows, it prompted me to install DirectX. This leads me to believe that Doom 3 uses Direct3D on Windows and OpenGL on the other platforms. Same goes for the original Half-Life (GoldSrc), it allows you to use either OpenGL or Direct3D on Windows. So, my question is, if you're going to implement the renderer in OpenGL, and gain cross-platform support, why bother implementing it in Direct3D as well?
Advertisement
DirectX provides for sound and networking as well.
Some driver manufacturers offer poor OpenGL support. One of my friends laptops can run Direct3D based games fine but my little OpenGL games struggle (and they are by no means graphically intensive). That would be my guess.
on some cards dx can be faster than ogl, on some others dx can be slower
personally when i tried irrlicht demos some time ago, i got greater fps with dx renderer
The renderer is OpenGL, DirectX probably needed for sound or input (ARGH).

DirectPlay is deprecated and isn't used any more, and DirectInput really shouldn't be used for anything except joystick input (But I know Doom3 uses it for mouse input due to the horrible mac-style non-balistic pointer...)
Well, they're different APIs with different feature sets, compatibility issues, and performance qualities. Including both gives the end user more options in case they have problems with one or the other.

Anyway, remember that going back to the days of Half-Life, video cards were not nearly as unified in standards. Half-Life also offered Software Rendering, because some people didn't even have 3D acceleration. Other people used cards with support for only certain APIs, so if you didn't include multiple renderers, they might not even be able to play the game at all.

As for Doom 3, id is kind of a throwback company. It should come as no surprise that Carmack would choose the route he did. He's one of the most set-in-his-ways developers I've ever heard of.

This topic is closed to new replies.

Advertisement