127 points · by mrsebastian · 14y ago · 69 comments
That doesn't mean they're wrong about OpenGL being faster than DirectX, and even if they are wrong, it doesn't mean they're being intentionally misleading. But it's important to keep our eye on the priors.
Valve (in their blog post):
"This experience lead to the question: why does an OpenGL version of our game run faster than Direct3D on Windows 7? It appears that it’s not related to multitasking overhead. We have been doing some fairly close analysis and it comes down to a few additional microseconds overhead per batch in Direct3D which does not affect OpenGL on Windows. Now that we know the hardware is capable of more performance, we will go back and figure out how to mitigate this effect under Direct3D."
Extreme Tech:
"As for why OpenGL is faster than DirectX/Direct3D, the simple answer is that OpenGL seems to have a smoother, more efficient pipeline. At 303.4 fps, OpenGL is rendering a frame every 3.29 milliseconds; at 270.6 fps, DirectX is rendering a frame in 3.69 milliseconds. That 0.4 millisecond difference is down to how fast the DirectX pipeline can process and draw 3D data."
In OpenGL all the fun stuff (e.g. the stuff that's in DX9+) is in vendor specific extensions.
A bit like vendor prefixes in CSS, except they can actually be implemented differently, have different names, etc. It's BAD news, and the main reason why 99% of AAA games use DirectX on Windows.
There are few things one might miss in core OpenGL 4.2. If anything any features exposed in extensions building on OGL 4.2 are so new or experimental that D3D doesn't have them at all.
You'll get hundreds of bug reports about game crashing on start.
Testing on old hardware (for <50 000 triangle games it's Intel GMA and Geforce 4 MX and some old Radeon) is a good way to be sure it works on most of computers. Of course game needs to support those old cards only on lowest quality settings.
But you have to be careful: my amateur OpenGL 3d game had problems running on half of computers, especially laptops. It's because various cards support different opengl extensions. You can't use non-power-of-two textures, can't use textures bigger than 512x512 (or other number), can't generate mipmaps automatically, can't have too big display lists.
I thought about optional DirectX renderer when running on Windows, because I've heard it's more standarized.
OpenGL is an awesome platform for those who want system portability IE minecraft, or any other indie developer who wants maximum exposure.
The question development shops would be asking themselves is: will the additional revenues provided by Linux / Mac ports of these games be enough to offset the cost of retraining their people (or hiring new people) who are prepared to do serious OpenGL development?
Moreover, many game companies are using licensed game engines. These engines may not now (or ever) support OpenGL, so the game developers themselves may not have the option to change--even if they did want to.
I'm pretty sure we're seeing that already. And WebGL is not going to improve the situation for D3D.
Make every game reinvent their own chip-level drivers? Wow. You want to run 10X faster, or slip your schedule by years?
Listening to people like Carmack, Torvalds, and others of their ilk is a good thing; but, we need to be cognizant that they are, themselves, special cases in the world of engineering and what can work well for them likely won't work well for the other 90% of the engineering world.
They imply well documented hardware and the potential to access it directly. But you can also use, and/or help improve the the higher levels of abstraction.
No, let's be honest--we'd end up with a half-dozen opinionated projects with slight overlap implementing different graphical interfaces, and another half-dozen metaprojects on top of that. Fuck. That.
Just give me a competent implementation of OpenGL or Direct3D by leading vendors who know their hardware and quirks, and be done with it.
> DirectInput
Officially deprecated for Windows Message Loop and XInput
> DirectPlay
Deprecated for GFWL, not even present anymore in the DirectX SDK (I believe), some modules (voice and NAT helpers) were completely removed in Vista.
> DirectSound
Deprecated for XAudio2 (Vista and 7 implement DirectSound in software, although ALchemy will dynamically intercept DirectSound3D calls and translate them to OpenAL on the fly on Audigy and X-Fi)
I do think this push into Linux is great for making Linux a richer platform overall. This way, everyone wins in that case, but I still do not see it an overly successful monetary venture.
If Windows 8 is a failure, people will either stay with what they know (Windows 7/XP) or continue to defect to OS X. Microsoft doing what they always do, will see where they need to improve, and continue to iterate and push out a more polished Windows 9.
Perhaps not, lets wait until Valve has a chance to fix their D3D issues. It seems to me the blog post was more about success in ferreting out problems with drivers and APIs on Linux and Windows than pure Linux/OpenGL superiority.
I'm a longtime Linux user and there is little reason to assume Linux the is king of graphics. One thing worth pointing out is that Valve is using a Nvidia card with proprietary drivers which don't make use of any shared Linux graphics infrastructure (Gallium3D, etc). So this type of performance gain compared to Windows may not be repeatable with Intel or ATI cards.
OGL still needs to get rid of the legacy fixed unit pipeline and standardizes the interfaces for more advanced functionality (like OGL ES 2 and DX10).
I gather you're talking about DirectPlay, DirectSound, and DirectInput?
They've all been deprecated and removed from modern versions of DirectX. You need to pull in other libraries to replace those portions (Games for Windows Live, XAudio2, and Windows Message Loop + XInput is one way to roll up that functionality).
Honestly DirectX is mostly just Direct3D in modern incarnations. The situation is fairly similar to modern OpenGL.
Sounds about right. If raw speed was more essential than less problematic development, we'd all be writing in assembler.
I don't know about that any more. I have heard that for about a decade, but with the massive changes that have been made to OpenGL, I don't see why that should still be true, if it even was true in the first place.
http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-an...
and a follow up:
Source: Current version on newest OS X if you don't want to support Legacy OS X is 3.2, Legacy OS X is 2.1 https://developer.apple.com/graphicsimaging/opengl/capabilit...
Most recent OpenGL is 4.2. http://www.opengl.org/
Most OS X coders, till the recent OS X release have been using 2.1 which was released in 2006 which is when OpenGL was inferior to DirectX in every way.
That's in part a driver issue (though Mach message traffic may also limit perfs), the drivers are mostly developed in-house by Apple, and Apple is notoriously hard to work with (for third parties). So while Valve did lead to significant performance improvements following Steam/OSX I would expect they couldn't work closely with internal drivers developers.
And game perfs probably still isn't the main focus for OSX drivers development, sadly.
Really? Are you sure about that? I'm pretty sure that while there's some Apple-supplied kernel-mode glue, and maybe a lot of user-space components, most of the driver code is actually supplied by NVidia/AMD/Intel.
In fact at one time or another OSX seems to have inherited funny GPU driver bugs that were common with Windows (like the way NVidia's 32-bit drivers were unhappy with living outside the 2GB-4GB memory range).
Although these days I'm it looks like they write significant portions of the graphic driver subsystems: when released their automatic graphics switching seemed quite markedly different from Optimus and completely independent[0], which is corroborated by them not wanting to restrict their ability to switch back to AMD.
[0] http://arstechnica.com/apple/2010/04/inside-apples-automatic...
So let me see if I can follow this: OpenGL is faster than DirectX because...OpenGL is faster than DirectX?
> we could be on the cusp of an OpenGL revolution
Close enough?