DirectX vs OpenGL

Mondozei

Golden Member
Jul 7, 2013
1,043
41
86
So I got a few beginner questions about each of them. First, I'm assuming that DirectX 11.2 is more advanced than Open GL 4.4, is this correct or an inaccurate assumption?
By advanced I mean has more sophisticated features.

And in addition to advanced, which is actually more efficient in terms of less overhead?

Finally, OpenGL tends to get updated each year in the summer, so we're about 4 months away from the next update. Are there any rumors and/or expectations of what will come to OpenGL 4.5 or do we get OpenGL 5?
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
So I got a few beginner questions about each of them. First, I'm assuming that DirectX 11.2 is more advanced than Open GL 4.4, is this correct or an inaccurate assumption?
By advanced I mean has more sophisticated features.
It's an inaccurate assumption.

And in addition to advanced, which is actually more efficient in terms of less overhead?
OpenGL. Take a look at this talk from Nvidia at Steam dev days. http://www.youtube.com/watch?v=-bCeNzgiJ8I&list=PLckFgM6dUP2hc4iy-IdKFtqR9TeZWMPjm

Finally, OpenGL tends to get updated each year in the summer, so we're about 4 months away from the next update. Are there any rumors and/or expectations of what will come to OpenGL 4.5 or do we get OpenGL 5?
I'm unsure that there's a public list of things that you can expect.
 

norseamd

Lifer
Dec 13, 2013
13,990
180
106
It's an inaccurate assumption.

this

Finally, OpenGL tends to get updated each year in the summer, so we're about 4 months away from the next update. Are there any rumors and/or expectations of what will come to OpenGL 4.5 or do we get OpenGL 5?

have no idea but often what is improved is in tech speak. would be nice for someone to interprete the improvements from 4.0 for us in easier to understand words for us

thankyou
 

brandonb

Diamond Member
Oct 17, 2006
3,731
2
0
You first need to understand that each of these are API's. In most API's, they are just a standard way for a developer to write something. On the backend, there is processing of these commands that actually does something.

Think of it as a calculator. There could be 100's of calculators on the market. But the API is the same. All of them take numbers, and operators (+-/*) and then there is that pesky = button. So when the programmer (user) enters the commands, it gives you the result. How the CPU inside the calculator calculates the equation could work really in any way, but to you, it's all the same because its the same API.

Now. When you think of it in this manner. Does OpenGL or DirectX have more overhead? It's really not a relevant question. It's just a way to translate programming commands to the GPU. DirectX was an API that was created that abstracts the underlying driver/manufacturer from the programming. So the programmer could write the program once, and have it work on any hardware. OpenGL is the same type of deal.

The difference here is implementation. With OpenGL, the video card manufacturers have to write the OpenGL to GPU implementation. So we can have wide variations in not only quality but also speed depending on driver versions and/or manufacturers or even GPU design.

Some of that is handled by Microsoft on the DirectX side. Such as memory management. My guess is that each video card driver (from the manufacturer) needs to write a memory management implementation for OpenGL. But on DirectX, Microsoft has done that within the DirectX API.

That could be a good or bad thing. DirectX maybe be more even in terms of performance/stability across vendors/implementation since it's doing more, but shortcuts could be made in drivers to improve the speed with OpenGL. But bad coding could make that implementation in the driver for OpenGL even worse than what Microsoft/DirectX has done, so there could be more overhead to OpenGL in some cases based on the driver, or it could be more efficient, you don't really know.

*Not really sure about all the internals, but this is how I understand it. It might not be very accurate.
 

Stuka87

Diamond Member
Dec 10, 2010
6,240
2,559
136
The Khronos Group actually post a lot of information about what is currently supported and what to expect. You just need to be a developer to really get anything from it. The same goes for DirectX and Mantle.

The average Joe is not going to really get anything from reading through documentation on current features, or what features are being changed/updated.
 

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
By and large you should consider them equivalent from a layman's point of view. There was a period around the xbox 360 release where DX had capabilities openGL did not but today its possible to implement all of the features you see in todays games on both APIs.
 

R0H1T

Platinum Member
Jan 12, 2013
2,582
163
106
By and large you should consider them equivalent from a layman's point of view. There was a period around the xbox 360 release where DX had capabilities openGL did not but today its possible to implement all of the features you see in todays games on both APIs.
Would it also be fair to say then that with the introduction of DX12 MS will be a gen(say a year or two) ahead of OpenGL in terms of features/performance that their new API will bring to the fore :hmm:
 

zlatan

Senior member
Mar 15, 2011
580
291
136
The big problem with OpenGL is it has many unobvious "traps", and the development tools are really awful compared to what Microsoft provides for Direct3D.

Modern OpenGL extensions are very useful for some serious problems. But I don't think that the developers will use these. Believe it or not ... If Intel/Nvidia/AMD came up with their own low-level APIs, it will be still easier to support those (yes three API) at the same time, than writing a standard OpenGL code with the same performance.
 
Last edited:

taltamir

Lifer
Mar 21, 2004
13,576
6
76
The big problem with OpenGL is it has many unobvious "traps", and the development tools are really awful compared to what Microsoft provides for Direct3D.

Modern OpenGL extensions are very useful for some serious problems. But I don't think that the developers will use these. Believe it or not ... If Intel/Nvidia/AMD came up with their own low-level APIs, it will be still easier to support those (yes three API) at the same time, than writing a standard OpenGL code with the same performance.

We already have such things. CUDA, Mantle, and AVX.
And they are showing tremendous improvements in any implementation. For example, CUDAminer is more than 2x as efficient than openCL based miners on nvidia hardware
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
We already have such things. CUDA, Mantle, and AVX.
And they are showing tremendous improvements in any implementation. For example, CUDAminer is more than 2x as efficient than openCL based miners on nvidia hardware
Nvidia has gimped OpenCL performance in their drivers.
 

norseamd

Lifer
Dec 13, 2013
13,990
180
106
Nvidia has gimped OpenCL performance in their drivers.

probably

they do stuff like this all the time

also there are more releases for open gl so even if dx 12 is more advanced when it releases open gl will likely catch up
 

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
Would it also be fair to say then that with the introduction of DX12 MS will be a gen(say a year or two) ahead of OpenGL in terms of features/performance that their new API will bring to the fore :hmm:

There are two problems with this assumption:
1) We have no idea what DX12 will include at all. The idea that DX would be more advanced we don't know what is in it is kind of amusing to me.
2) OpenGL has a lot of extensions DX doesn't. In many ways openGL remains more advanced in terms of features than DirectX, especially when it comes to reducing draw call overhead and such for modern small objects in games.

So no I highly doubt that DX12 will change the current state of play but since we have no visibility as to what it is we can't say it will or wont be.

OpenGL in many ways is more advanced just because its possible for the manufacturers to maintain extensions whereas in DirectX its not really possible. So if we were going to say anyone was behind it would be Microsoft and DirectX. Ever since openGL gained support for generic shaders its been capable of everything DX has and more. Even if the core openGL doesn't contain the feature the GPU manufacturers can add it via extensions and games can use it, and indeed a lot of the progress made for features in both APIs come from those extensions. OpenGL is the future of these APIs, its got a standards body running it, we have ways for manufacturers to differentiate and improve features and we have a nice stable process in and around it with good tooling.
 
Last edited:

Carfax83

Diamond Member
Nov 1, 2010
6,841
1,536
136
One area where DirectX trumps OpenGL is in support for multithreading. From what I've read, OpenGL's multithreading support only allows one thread to upload data at a time to the GPU, whereas with DirectX, multiple threads can upload data at the same time..

OpenGL supports bindless extensions though, which is supposed to be the best way for increasing batch submissions and reducing overhead..
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
Awesome link, does anyone else have talks from more tech companies?
From the playlist on the right. I recommend:-

Moving your games to OpenGL
http://www.youtube.com/watch?v=45O7WTc6k2Y&list=PLckFgM6dUP2hc4iy-IdKFtqR9TeZWMPjm

Game development with SDL 2.0
http://www.youtube.com/watch?v=MeMPCSqQ-34&list=PLckFgM6dUP2hc4iy-IdKFtqR9TeZWMPjm

I found this to be interesting as well. Getting started with Linux development.
http://www.youtube.com/watch?v=Sd8ie5R4CVE&list=PLckFgM6dUP2hc4iy-IdKFtqR9TeZWMPjm

Oh, stay away from Optimizing Linux Games for AMD Graphics. That presentation is boring as hell.
 
Last edited:

Anarchist420

Diamond Member
Feb 13, 2010
8,645
0
76
www.facebook.com
openGL is better because each vendor gets to create their own specs which means that games made for OpenGL dont have to be limited by microsoft's specs... devs can choose something better than what microsoft allows if it is supported by the vendor.
there is no way microsoft can cause perfect uniformity in specs and especially implementation between all vendors so that makes min specs pointless.

finally, khronos group was the original graphics group well before microsoft stuck its nose in it with dx and the former has a board of people that balances their power with the IHVs while microsoft forces the ihvs to include things. and if they include something not in the Dx specs, then the devs cant use it.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
openGL is better because each vendor gets to create their own specs which means that games made for OpenGL dont have to be limited by microsoft's specs... devs can choose something better than what microsoft allows if it is supported by the vendor.
there is no way microsoft can cause perfect uniformity in specs and especially implementation between all vendors so that makes min specs pointless.

more freedom is not the same as better. Especially not when it means higher development cost.

I prefer openGL for many reasons, but this isn't one of them
 

bystander36

Diamond Member
Apr 1, 2013
5,154
132
106
Everyone keeps saying how OpenGL is better, but if it is so much better, why does almost every game made come on dx instead? There has to be a reason.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Everyone keeps saying how OpenGL is better, but if it is so much better, why does almost every game made come on dx instead? There has to be a reason.

there are many reasons
1. DX is easier to develop for (aka cheaper)
2. nVidia and AMD tend to drag their feet on implementing openGL, and on fixing bugs in their implementation.
3. MS has, for many years, advertised its products to execs who are clueless to get them to overrule engineers
4. A lot of people say "better" instead of "I prefer", their values (backwards compatibility, cross platform, open, flexible, etc) are typically not the same as that of big corporate executives
5. Retooling between the two is very painful process, so companies get locked to it.
6. In terms of technical capability, DX and OpenGL have been going back and forth on which one is better, with DX being better at that for some long stretches of time.
7. MS rule of the market means they seem like the best platform to develop for.
 
Last edited:

norseamd

Lifer
Dec 13, 2013
13,990
180
106
Everyone keeps saying how OpenGL is better, but if it is so much better, why does almost every game made come on dx instead? There has to be a reason.

because it is alrady industry standard practice to use directx.

additionally the reasons above are also true
 

Red Squirrel

No Lifer
May 24, 2003
69,722
13,341
126
www.betteroff.ca
I would imagine this is similar to C++ vs C#.

C++ is open, platform independent and powerful, but harder to code in
C# is commercial, proprietary, platform dependant, but easier to code in

Big companies always like the proprietary commercial stuff, so that's why DX is used more. Personally if ever I code a game I'll be going OpenGL, or other engine that is based on it such as Ogre.
 

bystander36

Diamond Member
Apr 1, 2013
5,154
132
106
because it is alrady industry standard practice to use directx.

additionally the reasons above are also true
OpenGL is industry standard as well, though far less so on the PC, but if you go back a few years, OpenGL was the standard. Something changed, and everyone jumped ship.

If OpenGL is superior, as everyone here seems to say, you should expect OpenGL to take over again. Dev's never had an issue with OpenGL in the past, or even on other platforms. I do not see why they wouldn't switch again if OpenGL is notably better.

If the forum viewers here are right, expect a change, but it is just as likely that the forum viewers are missing something. After all, who here actually develops games on this thread?

Anyways, I hope OpenGL is as good as everyone is saying, and it becomes the new standard, as that means it will bring improvements and has a big advantage in portability.