Advertisement

API War

Started by April 14, 2009 05:39 AM
53 comments, last by zedz 15 years, 6 months ago
Please correct me if I've misunderstood and got things completely wrong here... I've read in a few places about the so-called "API War" between OpenGL and Microsoft's DirectX. From what I understand, these are the only two surviving 3D APIs today. There used to be two others called Glide and Redline, but they've both become obsolete. Nothing other than these two APIs is now supported by video card manufacturers. Is it possible that in the future, one of them will become obsolete and die just like Glide? There are two possibilities in my mind: 1. Microsoft decides to move over to something new, and discontinues DirectX. The new API fails to get as much support as expected, and OpenGL eventually takes over completely. 2. Microsoft includes a new feature in DirectX which becomes very popular (something like SSAO, but even more spectacular). OpenGL can't compete, and falls behind. What will happen if either DirectX or OpenGL gets the monopoly in this way? Thanks for reading through this, I hope it turns into a discussion interesting for everyone. [smile]
OpenGL has been stagnating and playing catch up to D3D for years. But both APIs are used for different things.

OpenGL is developed as a standard API for all 3d graphics operations, and is used in many different areas, not just games.

Direct3D is a product that Microsoft develops in order to create and advance 3D gaming graphics on their platforms.

OpenGL will always have it's place. The GPU companies market special higher end (quadro/firegl) cards for people doing high end CG or CADwork, it's a big business, it's NOT going to fade away. The entire CG and CAD software industries are built on top of OpenGL.
Advertisement
What if Microsoft decides to discontinue DirectX and make something better, then? Will the new product definitely get off the ground?
I don't see Microsoft ever dropping DirectX for something "better". So many games use DirectX (specifically Direct3D), they'd be shooting themselves in the foot.
You may as well wonder whether Microsoft would ever abandon Windows for something "better".
Quote: Original post by Codeka
You may as well wonder whether Microsoft would ever abandon Windows for something "better".


There are actually rumours along those lines, but I think they're baseless. Apparently Microsoft is developing a new OS called "Singularity", and some people think it will eventually replace Windows.

Anyway, does this mean that both OpenGL and DirectX will still be running strong in 15 or so years? If so, then that's good to know, because I'm a bit afraid of spending years learning one of them and then it becoming obsolete...
Advertisement
Quote: Original post by Jroggy
I don't see Microsoft ever dropping DirectX for something "better". So many games use DirectX (specifically Direct3D), they'd be shooting themselves in the foot.


With D3D10 they pretty much have replaced D3D. The library is entirely different they just kept the name the same. As far as I know the change hasn't driven many game developers to develop using GL instead (Though they may stick with D3D9 longer as D3D10 is Vista only).

Similarly with Windows they might replace the underlying OS but keep the name (Much as they did going from 98/ME -> XP).

So when asking if they'll replace DirectX, you're really looking at two things, changing the underlying API/technology (Has been done several times) and changing the brand (Yet to be done).

Quote: Anyway, does this mean that both OpenGL and DirectX will still be running strong in 15 or so years? If so, then that's good to know, because I'm a bit afraid of spending years learning one of them and then it becoming obsolete...


3D hardware and rendering techniques will have changed dramatically, so no matter what API you learn your knowledge won't stay up to date forever. The important thing is learning the underlying concepts, once you understand those you can quite happily jump between APIs (I started off learning GL and later Cg for shaders, when I decided to do something in DirectX it took me an afternoon to learn what I needed to know to make the jump) and you'll also be able to keep up to date with the latest developments.

So just pick one, it doesn't matter which and start learning. Writing a software renderer is also a valuable experience as it'll make you actually think about how rendering 3D via rasterization actually works (Building a ray tracer is also a good exercise, one that can be done in a weekend once you're reasonable well versed in the basics of 3D).
Quote: Original post by Sappharos
Anyway, does this mean that both OpenGL and DirectX will still be running strong in 15 or so years? If so, then that's good to know, because I'm a bit afraid of spending years learning one of them and then it becoming obsolete...
If that's what you're worried about, then I'm afraid you've got bigger problems :-) The whole of the software industry is constantly changing and what you learnt 15 years ago is very much "obsolete" today. I don't see that trend stopping - or even slowing down much - in the next 15 years.

If you're not willing to be constantly on the lookout for new technology, techniques and knowledge, then I'm afraid you'll be stuck programming the future's equivalent of PDP-10 mainframes and COBOL-based business rules (not that it can't be a lucrative business, if you can do it, it's just not a very marketable skill...)
You should learn as you go and build up knowledge while applying it. As a programmer, you should be able to get up to speed with these things in a matter of days, maybe weeks.

The idea of statically learning something and then applying that knowledge might apply to some skillsets like operating heavy machinery or functioning as an office clerk, but I think it's rather inpracticable for a programmer.

In a way, Microsoft has decided to "drop DirectX and do something better" about 10 times already.
- Up until DirectX 3.0, you had execute buffers, which were supposed to be the key to getting the most out of your graphics card. Then the entire API changed and execute buffers were dropped.
- Up to DirectX 5.0, there was D3D retained mode which provided a scene graph and automatic ligthing. If you built your application on that basis, well, the next version redesigned the API and dropped retained mode completely.
- Up to DirectX 7.0, you could use DirectDraw for speedy 2D graphics. Guess what? Yep, DirectX 8.0 just dropped DirectDraw.
- Up to DirectX 9.0, there was a fixed function vertex pipeline which provided you with vertex structures where you could store texture coordinates, normals and so on. DirectX 10.0 requires vertex shaders, the fixed function pipeline was dropped.

Many things in DirectX stay the same, others change. Every other release, a major concept is dropped or replaced with something better. Once, the DirectX API looked like some early office automation nightmare, today, it's much more streamlined and hides many of the COM details.

Learning this stuff should be a daily habit. Otherwise, by the time you completely understood the DirectX API, the next version would be due. Not to mention that in a typical game, you'll be using lots of libraries like FreeType, Boost, libpng, zlib, OpenAL, libvorbis and more, each with its own API.
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Quote: Original post by Sappharos
Anyway, does this mean that both OpenGL and DirectX will still be running strong in 15 or so years? If so, then that's good to know, because I'm a bit afraid of spending years learning one of them and then it becoming obsolete...


you're right.. much better to spend 15 years at the beach and then see what happens.



Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

This topic is closed to new replies.

Advertisement