

The Tale of OpenGL vs. Direct3D - tilltheis
http://programmers.stackexchange.com/questions/60544/why-do-game-developers-prefer-windows/88055#88055

======
brudgers
Though well written, I think the article misses an important point. Microsoft
designed Direct3D with games in mind and the culture surrounding OpenGL gave
priority to productivity applications for engineering and design as is
appropriate for something that was developed by Silicon Graphics.

The characterization of Microsoft being disorganized because they were working
on OpenGL at the same time as Direct3D is a direct result of misunderstanding
this difference. Microsoft had to address to entirely different markets:
gamers for whom high frame rates were much more important than fidelity and
engineers for whom accurate rendering was important (Even today, high end
graphics cards for Windows workstations run OpenGL.)

[<http://www.nvidia.com/object/autocad_pd_perf_drivers.html>]
[[http://en.wikipedia.org/wiki/Quake_engine#Reducing_3D_comple...](http://en.wikipedia.org/wiki/Quake_engine#Reducing_3D_complexity_to_increase_speed)]

3dLabs involvement with the development of improvements to OpenGL is
symptomatic of OpenGL's emphasis on fidelity in rendering and the legacy of
SGI from whence it evolved. The slow pace was perfectly acceptable to a group
of serious people who care about standards and don't care about games.

3dLabs is also an example of the distinct segmentation of the consumer and
engineering market for graphic cards in the PC market. The second PC I
inherited in my first CAD job had was a 386 with an Nth Engine B752 - you
could have built a kickass gaming system for the price of the card alone but
it wouldn't put much of a dent in the price of an Iris.

[[http://www.thecomputerarchive.com/archive/Displays/Video%20C...](http://www.thecomputerarchive.com/archive/Displays/Video%20Cards/Nth%20Graphics%20-%20Nth%20Engine%20video%20card.pdf)

Keep in mind that back in the 1990's all sorts of consumer grade graphic card
craziness was going on in Windows boxes - e.g. VESA local bus
[<http://en.wikipedia.org/wiki/VESA_Local_Bus>] and the volume of new Windows
machines was exploding and many of them were running graphically intensive
games.

~~~
SoftwareMaven
This is a really good point. OpenGL favored precision, which could slow things
down significantly. D3D favored speed at the expense of pixel-level precision.
I remember my ATI driver having a slider that I could turn up and down the D3D
precision.

Also missing in the article was the incredibly strong marketing efforts
Microsoft made towards game developers. I was in the industry at the time
(first at a game company, then a 3D modeling package company, then a 3D
modeling company) and you couldn't turn around without getting hit in the face
with something about D3D.

My undergraduate degree in CS came from the place that developed the tea pot
that sat on the cover of the original OpenGL developer books. I really wanted
to see OpenGL win, but between Microsoft exerting its unstoppable mid-90's
force in that space and SGI drying up, I think everything could have gone
right with the ARB and D3D still would have won.

------
marshray
The moderate experience I have with OpenGL confirms this explanation. However,
it sort of misses the point. The author may be a bit too close to OpenGL to
judge the relative significance of the all the historical details he knows.

Take a step back:

A) There's no way in hell Microsoft would allow OpenGL to take the lead from
Direct3D on Windows and Xbox. They would wield the carrots and the sticks to
prop up Direct3D (and perhaps even disadvantage OpenGL) if it ever came down
to it.

B) OpenGL is a success by any objective measure. Nearly every platform
_except_ Windows and Xbox uses it exclusively. E.g. mobiles. Game consoles may
have dedicated APIs but I'm sure there's a better OpenGL compat layer than a
Direct3D.

Recently I've developed some code on Linux for OpenGL 3.3 with GLSL and it is
awesome.

~~~
kenjackson
_OpenGL is a success by any objective measure_

OpenGL is a success. D3D is a success. Two competing products/APIs/services
can both be successes. The game is about providing solutions. Both D3D and
OpenGL did that for a large customer base. It's not about winning/losing, but
does it help solve your problem.

------
Impossible
This is probably the most accurate view of the history of OpenGL vs. Direct3D
I've seen on the internet. It goes into the actual implementation details of
why OpenGL or D3D have been more or less popular for games\graphics
programming over the years. Also follows my personal adoption of the APIs for
projects pretty closely. Most other comparisons are too political or anti-MS,
and are often written by people that have limited (if any) experience with
Direct3D.

~~~
TomOfTTB
I don't know. If a historical account gives the details it knows correctly but
leaves a bunch of details out is it still accurate?

There's actually a great book written about the creation of Direct3D called
Renegades of the Empire (<http://tinyurl.com/3n4jnru>).

Having read that book I can tell you this account, while accurate in its
technical details, misses a lot of other issues that were going on. For
Instance...

1\. The team pursuing OpenGL was part of the Windows NT group (back when NT
and '95 were two different products). The Direct3D team was part of the
consumer Windows group. So Microsoft's support (or lack thereof) for OpenGL
games was largely based on an internal issue. With Microsoft dragging its feet
on implementation in consumer Windows it forced a lot of developers to move.

2\. On that note Microsoft's Consumer Windows group was all about moving
developers to Windows and making Windows the defacto game standard (and as a
result killing off other platforms like Mac, OS/2, etc...). Both the Mac and
OS/2 supported OpenGL while they couldn't support Direct3D

3\. Direct3D benefited from other parts of the DirectX API. DirectSound, for
example, made it very easy for developers to support Aureal's 3d sound
technology while still being backwards compatible. DirectInput made it easy to
support things like ForceFeedback joysticks. And so on...

4\. Microsoft bribed Developers (They did, read the book)

So while the technical analysis is correct here OpenGL's fall was due more to
a powerful company doing everything it could to kill the technology off.

~~~
Impossible
Oh I don't doubt that Microsoft politics and their "own the API" policy helped
hurt adoption of OpenGL on Windows, but blaming the state of OpenGL on non-
Windows platforms on Microsoft is giving them a little too much credit. The
ARB was just as much at fault. Apple has had a lot invested in OpenGL, both on
the desktop and OpenGL ES and in theory has just as much pull (if not more) as
MS, and hasn't done much to improve the state of OpenGL either. Things have
been better post ARB, Khronos does a pretty good job, especially with OpenGL
ES (which still has its faults... [http://aras-p.info/blog/2011/03/04/mobile-
graphics-api-wishl...](http://aras-p.info/blog/2011/03/04/mobile-graphics-api-
wishlist-performance/)).

In an alternate reality where Windows is still the #1 desktop PC gaming
platform, and MS adopted OpenGL instead of developing Direct3D, we'd end up
with Microsoft specific extensions and vendor specific extensions to keep
OpenGL up to speed with current hardware.

------
latch
As if Glide never existed

In all seriousness, I did 1 graphics programming course back in the day, and
it was pretty insane. This was all in OpenGL. The amount of code required to
draw the simplest scene was massive. I seem to remember there's a built-in
teapot primitive, and I ended up just using that to construct everything (yes,
there are simpler built-in primitives, but none nearly as cool as a teapot). I
didn't do very well in that course.

~~~
megrimlock
The space of OpenGL programs that fail to produce anything visible onscreen is
surprisingly vast.

~~~
JonnieCache
This was my experience during my brief foray into graphics programming at uni.
I remember failing a lot, thinking "this can't be me, somebody else somewhere
is doing it wrong" and abandoning it in lieu of something more productive.

------
goalieca
Wikipedia also has an extensive page on this topic
[http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct...](http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D)

------
ANH
Another thing that isn't exactly helping OpenGL is Apple's slow creeping
adoption of recent versions. I'm running the latest Snow Leopard and my code
is reporting OpenGL 2.1.

I'm not really blaming Apple. I mean, on top of the core version they've
implemented about 100 extensions with names like GL_ATI_separate_stencil,
GL_NV_fragment_program2, GL_ARB_instanced_arrays, etc.. But the OpenGL 4.1
specs were released a year ago and I've got 3D code that runs significantly
faster when I boot into Windows. Exact same hardware, but it's OpenGL 2.1 (+
extensions) vs. Direct3D 9.

~~~
brudgers
I would suggest that Apple's historic attitude toward the Mac as a gaming
platform is reflected in the effort your graphic engine provider invested in
creating drivers for each OS and in the case of OSX perhaps a driver
specification which may stifle flexibility - for example NVIDIA's latest Snow
Leopard driver is designed so that it runs on everything from chipset to
worksation graphics engine. [[http://www.nvidia.com/object/quadro-
macosx-256.02.25f01-driv...](http://www.nvidia.com/object/quadro-
macosx-256.02.25f01-driver.html)]

~~~
ANH
I didn't have games in mind, really. I am not developing one.

I would suggest Apple could do a better job of keeping up to date with more
recent OpenGL specifications. In fact, I am suggesting it.

~~~
brudgers
The ability to support a particular OpenGL standard is dependent on the
hardware (software implementation aside). It is not something that Apple can
choose to implement on less capable hardware. That's almost certainly why both
Windows and Mac are running OpenGL 2.1 - OpenGL 2.1 is all the hardware will
support.

On the other hand, based on your report it appears that NVIDIA has invested
more effort in the performance of their Windows driver than in the performance
of their Mac driver. Given their economic interests and the fact that many
people using their hardware under Windows are NVIDIA customers whereas the
vast majority of people using their hardware are Apple customers, it is hardly
surprising that they would do so.

I will point out that for people who give a high priority to 3d graphic
performance, there is little reason to select an Apple product - a meaningful
range of hardware options simply does not exist and the drivers simply receive
less attention. Keep in mind that one of the major differences between
workstation class graphics cards such as NVIDIA's Quadro and gaming cards is
the quality of the drivers - the same GPU's are often used in both segments
with driver performance justifying much of the cost premium workstation cards
command.

------
landhar
Also worth reading: [http://blog.wolfire.com/2010/01/Why-you-should-use-
OpenGL-an...](http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-
not-DirectX)

~~~
eropple
Not particularly worth reading, no. It's a pretty poor mistelling of the
story, and inaccurate and foolishly partisan throughout to boot. It comes off
as fanboyism and flamebait.

From reading the comments, it seems like the blog's audience is people who
spell the name of that big company in Redmond as "Micro$oft". They are
definitely an appreciative audience for Wolfire's silliness, but it in no way
has any sort of step on the post linked at the top of this HN thread.

------
barrettcolin
As a complement, Chris Hecker has kept some of his notes regarding OpenGL vs.
Direct3D around:

<http://chrishecker.com/OpenGL>

It seemed quite important at the time that he- who begat WinG, which begat
DirectX, some of which is covered in Renegades of the Empire, which someone
else mentioned, which is certainly worth reading- went on to agitate for
OpenGL over Direct3D. Now there's kind of a scrapheap of history vibe off of
the whole thing.

------
deathwarmedover
I feel a lot less ignorant of all that was going on behind the scenes whilst I
was rocket-jumping, exploring black mesa, destroying diablo's soulstone,
driving around liberty city etc

------
rvkennedy
The article misses one of the more interesting recent developments - that via
OpenGL ES, GL is effectively doing an end-run around the whole Direct3D
roadblock. As several posters have mentioned, GL ES is the standard in all the
major mobile platforms. Now WebGL is threatening, not without some MS
pushback, to become the standard for native 3D on the web.

Almost by default - simply because DX is a Windows/Xbox technology, and these
platforms (particularly Windows, but also the traditional consoles) are fading
- and GL is ruling the new world of games - online games, Facebook games, web
and so on.

It's rare indeed on HN to see much talk of Microsoft's continuing dominance,
because in the web/tech world, that dominance doesn't exist. Games are
changing too. And it's games we're talking about here - OpenGL has always run
the show in serious applications of 3D, and that shows no signs of abating.

------
Fuzzwah
As a gamer all I knew was that Quake ran fast and Monster Truck Madness was
framey as hell on my box. Thus I knew that OpenGL was good and Carmack was god
and D3D was terrible.

~~~
bad_user
Carmack recently changed his opinion on D3D: [http://www.bit-
tech.net/news/gaming/2011/03/11/carmack-direc...](http://www.bit-
tech.net/news/gaming/2011/03/11/carmack-directx-better-opengl/)

------
gavanwoolery
I just wrote about this recently, although with more focus on Microsoft's
mistakes post DirectX 9.0:

<http://altdevblogaday.com/author/gavan-woolery/>

:)

------
spydum
_slow clap_

