Is It Time For an OpenGL Gaming Revolution?
MrSeb writes "In a twist that reinforces Valve's distaste for Windows 8, it turns out that the Source engine — the 3D engine that powers Half Life 2, Left 4 Dead, and Dota 2 — runs faster on Ubuntu 12.04 and OpenGL (315 fps) than Windows 7 and DirectX/Direct3D (270.6 fps); almost a 20% speed-up. These figures are remarkable, considering Valve has been refining the Source engine's performance under Windows for almost 10 years, while the Valve Linux team has only been working on the Linux port of Source for a few months. Valve attributes the speed-up to the 'underlying efficiency of the [Linux] kernel and OpenGL.' But here's the best bit: Using these new OpenGL optimizations to the Source engine, the OpenGL version of L4D2 on Windows is now faster than the DirectX version (303.4 fps vs. 270.6 fps). If OpenGL is faster, and it has a comparable feature set, and hardware support is excellent... why is Direct3D still the de facto API? With Windows losing its gaming crown and smartphones (OpenGL ES!) gaining in popularity, is it time for an OpenGL revolution?"
If L4D2 was using the latest DX11.1 implementation and the latest technique, I'm not so sure it would be faster on OpenGL.
Because MS makes Windows and bundle their API with it of course.
Besides that most, if not all, of my console games are OpenGL not DirectX.
DirectX has the advantage of other features built in. OpenGL is just graphics. DirectX also does audio and manages controller input.
Low, there are several Open source API's that offer these other features, and some that bundle them with OpenGL, but it isn't as standardized.
I use LWJGL personally.
interesting
Major software companies will put more effort in the tablet and more portable touch displays.
That's already starting to happen. Tablet sales are 24% of the market in 2012, but are increasing 100% year over year. If that continues for 18 more months, tablets will be outselling "traditional form factor" PCs, including laptops and desktops, within a few years. Of course, the installed base of traditional PCs is still larger so it will be several years after that before the tablet form factor has a larger install base, but the writing is on the wall.
One of the BIG issues is this: D3D9 vs OpenGL v2.x. The architecture of D3D9 has that each draw call (i.e. each batch) is really freaking heavy call. It is heavy in GL implementation as well, but D3D9's is very, very heavy.
Now make a more honest comparison: D3D10 vs OpenGL 3.x and/or D3D11 vs OpenGL 4.x. Those numbers are for mare informative.
Additionally, a fair amount of D3D's implementation is actually Microsoft (think of what they provide as a framework to make a driver). On the other hand, when making a GL implementation, the implementer does it from scratch on their own. Open source drivers are usually based off of Mesa, which sucks which is one of the reasons why open source GL implementations suck compared to the closed source ones. My hunch is that an OpenGL implementation is more work than a D3D implementation.
Now lets talk GL bugs. For NVIDIA and AMD, the GL2.x feature set is very, very reliable. GL3.x feature set is mostly reliable. GL4 feature set is the wild wet: be prepared for bugs.
I remember from when I was doing GL3 work (before GL4 was out) and there was a bug in NVIDIA related to gl_ClipDistance. Essentially, gl_ClipDistance would not work in shaders (the GL program failed in glLinkProgram and/or the shaders failed to compile). The bug fixing was essentially NVIDIA just finding out... passing GL conformance tests I suspect leaves large gaping holes... and when combined with GL extensions, it is unholy.
Atleast desktop GL has come a long way now with AMD making good GL drivers (as years ago ATI GL drivers were basically just able to play IDSoftware games). But GL4 features is dicey, simply because the conformance tests are not that much and not a lot of code out there using it.. in comparison Microsoft's verification, although can leave holes too, does a much better job... D3D driver bugs are rarer than GL driver bugs usually.
But you boys on desktop have no idea how good you have it... GLES2 implementations are buggy all the time in weird horrifying ways. This is one reason why iOS is better game platform than Android: essentially only a handful hardware/driver combinations to find bugs and create work arounds.
I followed a few links and found my way here:
http://www.paranormal-entertainment.com/idr/blog/posts/2012-07-19T18%3A54%3A37Z-The_zombies_cometh/
It's a blog about an experience intel driver developers had working with the Valve Linux team. What I found interesting is that the Valve developers prefer working with open drivers for an obvious reason - It's hard to find out what went wrong when you're dealing with a black box. What I gathered from the discussion is that this openness was a huge boost to development of both the game and the driver. This gives me hope that there may be a bright future for open source graphics drivers and even gaming on Linux.
From the blog:
Haswell will have 40 execution units in it’s best bin. It’s 2,5 faster even if they not gonna change anything in shaders, which is unlikely. Plus 64 MB of on-package memory to deal with bandwidth problem.
With that performance and official open-source driver Intel will be the best choice for gaming in Linux next year, at least in notebooks.
A pretty good GPU + an open driver + an open kernel coupled with a working relations ship between the 3 groups should result in a super graphics and games on Linux. I'm not a gamer, but I'll buy their games just to support this. Typing this on a Sandy Bridge machine pulling from xorg-edgers.
This article is based on Left4Dead 2, which use DirectX9. It's not relevant anymore. It's from years ago. Microsoft improved DirectX A LOT since then.
It is very relevant to anyone using Windows XP and/or many older and especially integrated graphics cards. Which is a lot of people. Most modern games include a DX9 rendering mode (or only use DX9, period) for that exact reason.
"None can love freedom heartily, but good men; the rest love not freedom, but license." --John Milton
On the referenced blog, I asked whether they'd repeated the test for a 64-bit Linux distro to directly compare to the 64-bit Windows installation they used. Unfortunately, my comment there got deleted. Does anyone have any insight as to what effect switching to a 64-bit distro might have? On one hand, x86-64 has a reputation for being more compiler-friendly than x86-32, what with more explicitly-named registers and all the other goodness. On the other hand, it'd have to sling around longer pointers (and possibly waste more space on 8-byte-aligned data structures? Is that true?). What would the net result likely be?
Put another way, I wish they'd eliminated that rather large test environment variable before publishing their numbers.
Dewey, what part of this looks like authorities should be involved?
That's part of the polish. Driver availability and stability all contributes to the OS experience. Yes, it's not trivial to write your own if it isn't provided by the manufacturer.
But the very act of having to go search online is just as annoying whether for a driver or for a piece of software that does what you want done.
It's all a part of the polish.
"If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
Sometimes I wonder, since most public sales rankings don't include digital downloads (what a redundant term), and right now the aging current generation of consoles can't hold a candle to PCs for size of selection or quality of graphics. I have pretty old, moderately priced, video card, and my hardware is hardly new or exciting (AMD Phenom II x4 965 Black, ATI/AMD 5770, 6GB of DDR2), and pretty much every game I play looks better than it would on a console, with better FPS, textures, shading, FOV, etc... If I was a console gamer (I have a forgotten, forlorn, Wii) I'd probably be thinking of trying PC gaming. Especially since the barrier to entry is pretty low right now (you have a moderate computer from the last 2-3 years? Have $100-200 to throw at a video card? Poof, new console that you can also use for more than a paperweight when your not gaming).
Sadly the sales figures won't tell us if this is happening, since they only count retail. I have a feeling that the majority of PC games are now bought through digital distributors like Steam, GOG, or Desura.
I wonder what would happen to sales figures if they suddenly added Steam's statistics to them...
Also, Valve isn't anything special, they aren't terribly "techie". I don't see what would make them so either, you download a client, you hand them your credit card, and games automagically appear on your computer, with no (ideally) setup, mucking with registries, or anything else of a technical nature. Using Steam is about as simple as using a console, sans the time to download the game. Click a button, you're playing. Nothing remotely technical. If you were talking about GOG, then sure... you might have a point... but not Steam.
A patriot must always be ready to defend his country against his government. -edward abbey
I'm one of the people who get paid a lot of money to find 0.5ms gains, and yes, in this case it's hardly worth mentioning. Differences in frame time when you're sub 4ms really are not significant and are likely to be due to any number of bottlnecks which are unlikely to be present at more realistic framerates (when people like me might be more likely to care).
There's no indication here about hardware, drivers, or any number of external factors here. This is purely Valve having another dig at Microsoft in the press, because Win8 threatens their business model. There's a lot of smart people working at Valve. I'd expect better of them.