DirectX vs OpenGL

Hi Developers and fellow forum commanders,

I was woundering why Elite's graphics are being developed under DirectX and not OpenGL. I am aware of the better driver support under windows and the Microsoft smear campaign against OpenGL back when Vista was being developed but since you have plans to release to other platforms (Mac, Linux) it would seem like a lot of work would be required to convert over from Windows.

Are you hoping to release on XBOX ONE by keeping to DX?

I believe PS4 is OpenGL too if there are future plans for that machine.

Or is your technology similar to Valve's Source engine and that is it build from the ground up to use the two different formats depending on the platform?

I was only thinking because of the amount of people who complain of dodgy frame rates and that OpenGL shows signs of higher performance (although that is based off results from Valve and some other game developers).

I only ask about this because one day I hope for a gaming operating system that will use the full potential of the hardware and SteamOS seems to be the first. I hope it delivers what it promises. Each new DirectX that comes along seeems only to leach frame rates with little return.
 
Last edited:
Heya! Long time OpenGL aficionado here. That's indeed a good question. I hope they'd have the capability to run different renderers in their Cobra engine, but I don't know for sure.

However, note that they stated the intent to release a version for OSX - so perhaps they already do.
 
From what I understand, the Cobra engine / development environment that E: D is being developed on supports both.
It's also worth noting that E: D will be out for MAC 3 months after the full Windows release if all goes according to plan. Last time i checked, OS X used OpenGL as the main library for 3D graphics acceleration.
 
OpenGL still exists ? That brings me back to high school years when I got my first very own PC, and in all games settings I had to choose between ugly software rendering, and slick OpenGL with mipmaps and stuff.

I thought all PC games used DirectX nowadays...
 
OpenGL still exists ? That brings me back to high school years when I got my first very own PC, and in all games settings I had to choose between ugly software rendering, and slick OpenGL with mipmaps and stuff.

I thought all PC games used DirectX nowadays...

Yes, most Windows games do use Direct3D instead of OpenGL. However on pretty much every other non-Microsoft platform, 3D graphics are done with OpenGL: Mac, Linux, iOS, Android, etc.
 
OpenGL still exists ?

Yup. And guess what, DirectX pretty much copies the principles of OpenGL these days. Thank god they ditched their hideous execute buffers.

They haven't figured out the extension mechanism yet though, so perhaps DirectX13 will have that too at last :p


Seriously though, yes OpenGL exists and even though it is not the most popular, it is far from dead.
 
Only going by my experiences in Wow, but if I fired the game up in MacOS i.e. OpenGL it was a laggy mess with low rez. textures and struggling to get 30fps.
If I then bootcamped into Win7 and went into it again at the same location I would get 40-60 fps with much better looking visuals i.e. lighting effects through trees etc.

Obviously this is with exactly the same hardware on an iMac with just the OS making all the difference.
 
Obviously this is with exactly the same hardware on an iMac with just the OS making all the difference.

Which is not a problem of OpenGL but rather Apples stubbornness of producing their own drivers which has poor performance compared to drivers from the GPU vendor.
 
Which is not a problem of OpenGL but rather Apples stubbornness of producing their own drivers which has poor performance compared to drivers from the GPU vendor.

The story is the Steve Jobs hated games and didn't want to throw any money at it. Don't know if thats true though.

Anyone know what the PS4 uses?
I know the PS3 had its own custom version of OpenGL, did they stick with this?
 
Anyone know what the PS4 uses?
I know the PS3 had its own custom version of OpenGL, did they stick with this?

PS3 has GCM for low-level hardware access and a PSGL layer that provided something similar to opengl.

PS4 has GNM for low-level hardware access and a GNMX layer that provides something similar to DX/opengl.

In practice, most games will use a 3rd party graphics engine, and that engine uses GCM/GNM.
 
In practice, most games will use a 3rd party graphics engine

Considering how many games FD have developed, they probably have a significant bank of experience and IP when it comes to platform-independent engines. In all likelihood is that their engine only has a DirectX backend, but can support more (such as OpenGL) - chances are they wouldn't have to go 3rd party.

The main reason you want to use DirectX is marketing. DX11 sounds far better than OpenGL 4.5. Gamers know what fidelity to expect from DX11, but OpenGL versioning is very opaque to anyone who hasn't actually developed against it.
 
Another game I am interested in is Planetary Annihilation. The graphics dev there has posted some very interesting articles about their use of OpenCL, and their move from DirectX. I'll try and find the links later.

Bottom line, he said the transition was hideous, but worthwhile - for the cross platform aspect.

His biggest issue was crappy driver support, and the need to have fallback paths in the code, if certain drivers did not support certain levels.

I personally am looking forward to DX12, which in theory is a little closer to the metal - like the AMD Mantle API. And while this gives a performance boost, and allows better threaded access to the GPU's, it also puts more management in the hands of the developers - which is not always a good thing.

I would love to see a "behind the scenes" presentation of all things ED. Server Architecture, Graphics pipeline, artists pipeline etc. I know seeing these things in other games (you know the one) is very interesting. I am a tech head most of the time.

Bring back the DEV Diary! In fact, I might just create a poll for that! :D

Slim
 
Good read

i believe Microsoft doesnt even try with DirectX. After all they think they have another monoploy. Plus they would not want people knowing that PCs could blow away their console, especially when you can build one for cheaper than purchasing the XBOX ONE.

OpenGL, I believe, is more efficient. On my phone i can play awesome looking games running on batteries. A gaming PC usually has mains 800w power supply!!! PCs should be leading the market with the power inside that case.

I think directx had a time. When there were driver problems all over the shop. Now manufacturers (AMD, Intel,NVidia etc) are much more on the ball with drivers and computer manufacturers (Dell, Toshiba etc) are great with support and downloads now. PCs have never been so organised.
 
Every time I see a thread like this, I come in expecting to see a bunch of misinformation, and this thread is no exception. Truth be told, you can't really just directly compare OpenGL and Direct3D. Sure, they're both competing API's, but they come from completely different modes of thought. Here's a quote from Wikipedia, which explains the differences better than I could.

In general, Direct3D is designed to virtualize 3D hardware interfaces. Direct3D frees the game programmer from accommodating the graphics hardware. OpenGL, on the other hand, is designed to be a 3D hardware-accelerated rendering system that may be emulated in software.

As such, there are functional differences in how the two APIs work. Direct3D expects the application to manage hardware resources; OpenGL makes the implementation do it. This tradeoff for OpenGL decreases difficulty in developing for the API, while at the same time increasing the complexity of creating an implementation (or driver) that performs well. With Direct3D, the developer must manage hardware resources independently; however, the implementation is simpler, and developers have the flexibility to allocate resources in the most efficient way possible for their application.

Until about 2005, another functional difference between the APIs was the way they handled rendering to textures. The Direct3D method (SetRenderTarget()) is convenient, while prior versions of OpenGL required manipulating pixel buffers (P-buffers). This was cumbersome and risky: if the programmer's codepath was different from that anticipated by the driver maker, the code would have fallen back to software rendering, causing a substantial performance drop. However, widespread support for the "frame buffer objects" extension, which provided an OpenGL equivalent of the Direct3D method, successfully addressed this shortcoming, and the "render target" feature of OpenGL brought OpenGL up to par with Direct3D in this respect.

Outside of a few minor functional differences which have mostly been addressed over the years, the two APIs provide nearly the same level of function. Hardware and software makers generally respond rapidly to changes in DirectX, e.g. pixel processor and shader requirements in DirectX 9 to stream processors in DirectX 10, to tessellation in DirectX 11. In contrast, new features in OpenGL are usually implemented first by vendors and then retroactively applied to the standard.

As for performance, OpenGL 4+ and Direct3D 11 are pretty dang close these days. As someone who has taken the dive and tweaked nVidia's Mac drivers to run a GTX 770 in his Mac Pro, I can say that games like WoW, The Witcher 2, and Batman: Arkham City perform pretty identically to Windows when OS X is allowed to run on decent hardware.

Honestly, I'm just as tired as the rest of you with the whole "Mac vs. PC" debate. I'll be the first to say I own and love my Macs, but I'm under no illusions that Apple hardware isn't grossly behind retail PC hardware.

But while the hardware is a bit dated, Mac OS X 10.9 and 10.10 DO include OpenGL 4+, and aren't anywhere near as behind in game performance as people still believe. As stated above, the games run almost identically when the hardware isn't crap. The explosion of Mac versions of a huge number of triple A games on Steam's Mac client is proof of it.
 
Last edited:
OpenGL, I believe, is more efficient. On my phone i can play awesome looking games running on batteries. A gaming PC usually has mains 800w power supply!!! PCs should be leading the market with the power inside that case.

OpenGL and DX on PC are basically equivalent. In some situations OpenGL extensions can squeeze out better performance - but those are not universal situations, and are not available on all hardware or on all GPUs.

You mobility GPU isn't doing as much work as your PC GPU. Mobility games use tons of "shortcuts." Played on a big screen (such as your PC monitor) phone games graphics are typically worse than those on, say, a Wii.

The only advantage OpenGL has over DirectX is theoretical platform-independence. The only advantage DirectX has over OpenGL is that it's a far cleaner API and therefore much more productive to develop against.
 
Last edited:
i believe Microsoft doesnt even try with DirectX. After all they think they have another monoploy. Plus they would not want people knowing that PCs could blow away their console, especially when you can build one for cheaper than purchasing the XBOX ONE.

OpenGL, I believe, is more efficient. On my phone i can play awesome looking games running on batteries. A gaming PC usually has mains 800w power supply!!! PCs should be leading the market with the power inside that case.

I think directx had a time. When there were driver problems all over the shop. Now manufacturers (AMD, Intel,NVidia etc) are much more on the ball with drivers and computer manufacturers (Dell, Toshiba etc) are great with support and downloads now. PCs have never been so organised.

DirectX 9 was really when Microsoft seemed to be throwing money at it, and it worked. Since then things have greatly slowed up, they used to put up an updated version of the SDK every 3 months.

What they did with Vista and pretending XP couldn't run DX 10 just caused more hate for the Microsoft machine.

Like you say, they have (or had if OpenGL picks up speed) a monopoly on PC gaming (and apple doesn't care to compete) and monopolies aren't good for innovation.
 
The only advantage DirectX has over OpenGL is that it's a far cleaner API and therefore much more productive to develop against.

While true at the moment, this is expected to change upon the next major OpenGL release, which is supposed to be the ground-up rewrite that was originally planned for OpenGL 3.
 
While true at the moment, this is expected to change upon the next major OpenGL release, which is supposed to be the ground-up rewrite that was originally planned for OpenGL 3.

Oh yeah, definitely. OpenGL 3 is a massive step forwards as it is. I actually took the time to pick it up, instead of immediately discarding it as "worthless" like I did with OpenGL 2.
 
OpenGL, I believe, is more efficient. On my phone i can play awesome looking games running on batteries. A gaming PC usually has mains 800w power supply!!! PCs should be leading the market with the power inside that case.

Not really true. I have a 530W PSU, and that is more than enough for my AMD R9 270X to run games on max settings. You only need 800W or higher if you are planning on SLI/Crossfire with a power hungry GPU. As for mobile games, don't even go there, please. They don't even come close to games on a PC.
 
Back
Top Bottom