A question by Loki got me looking at the state of DirectX/Direct3D and OpenGL. We hear Windows runs games faster on Direct3D than on OpenGL. That is supposedly why Second Life™ viewers run slower, fewer Frames Per Second (FPS), than other games using Direct3D. But, some people say otherwise. One of those people is Steam or more accurately the online gaming company Valve.
Valve makes the Source Engine that runs Half Life 2, Left 4 Dead, and Dota 2. Valve is not a Microsoft fan, which I don’t find surprising as Microsoft is known for trying to make Windows a closed shop that keeps other gaming systems at a disadvantage. In testing in August 2012 Valve reported that OpenGL on Ubuntu ran faster than DirectX/Direct3D did on Windows. You can read more about that in: OpenGL is Faster.
This tells us it is not just OpenGL and Direct3D that solely control performance. The OS has quite a bit to do with it also.
There are celebrities in the gaming development world one of which is: John Carmack. John is a co-founder of id Software and well known gaming graphics programmer. So, it is a big deal that John develops games based on OpenGL. Since he is looking for the best performance for id’s games, the choice of OpenGL is remarkable and I think says a lot about OpenGL. It was stunning that he once spoke about changing to DirectX/Direct3D. However, it never happened. All the new stuff from id Software uses OpenGL.
In August of this year John made a 3.5 hour keynote speech at QuakeCon, August 2012. Look at time mark 2:45:00± for comments on Windows 8.
The speech is geeky and shows where tech is, if you have the patience to listen to the WHOLE thing. Some quick takes for getting a sense of OpenGL are:
00:46:00 Valve – Steam and what they are doing.
00:57:00 Mobile Gaming and where it is… or isn’t.
2:27:00 OpenGL – WebGL
2:30:00 – John says Direct3D is probably better than OpenGL – This is tricky to explain. John says Direct3D by MS is well documented and the API’s well described and the API’s work well together. John has described it as cleaner than OpenGL API’s. But, once OpenGL is learned and understood, it seems to do more things. Whatever the case, John is building his games using OpenGL. So, I am taking him to mean Direct3D better as in better organized and easier to learn than OpenGL.
2:33:00 – WebGL – It sucks – John’s opinions of WebGL dashed some of my hopes and certainly many of my expectations for WebGL being able to support games and platforms like Second Life.
2:40:00 – OpenGL complexity – John talks about the complexity of OpenGL. He is amazed at how well driver developers are doing supporting OpenGL. From what manuals I’ve read about using OpenGL I am not surprised that SL is slow. Even id’s Rage was laggy and suffered poor frame rates and it used OpenGL 3.2. Some blogs reported: “…gamers are already lashing out (Steam, NeoGAF), calling RAGE a “broken mess.” The biggest complaints describe intense screen-tearing, poor texture loading and numerous other glitches. Most of the problems reportedly revolve around AMD customers, but Nvidia patrons are also having their fair share of issues as well. Even Alec Meer from Rock, Paper, Shotgun says that he’s seeing quite a few technical problems on his PC to the point where he isn’t even sure he can keep playing.” Tom’s Hardware
But, OpenGL has allowed the addition of extensions. That has allowed id Software to do things they could not do with Direct3D… or at least not as they wanted to do them.
We see games with frame rates of 200+ that use OpenGL. So, what is happening with Second Life that so many see 15 FPS with some pretty high end equipment? It is hard to say. My guess is somewhere in the complexity of OpenGL and the SL Viewer’s render pipeline something is not quite right.
Some systems run SL extremely well. Some systems that are very similar if not identical run it poorly. Until someone figure out what’s up, things will probably stay that way.
But, the evidence is that OpenGL has the ability to perform very well. The people at Valve have been optimizing their game engine for it. The people at id Software have been optimizing their games for it. The staff at the Lab has worked on the pipeline to improve performance too. They all have had problems and successes. So, it is not just the Lab.
We can hope to see things improving this year as more of Second Life’s tasks are moved into separate threads, the communication channel is improved, the work the viewer and servers do is better coordinated to reduce communication traffic and work load, and only the things we can see get put into the render pipeline. But, in general I think SL will remain slower than most rendered 3D worlds. The SL viewer has so many things to do that most other games do not. SL would have to have a much higher performance video system to just match many other games that can concentrate only on rendering.