Jump to content
  • Advertisement
Sign in to follow this  
moeen k

OpenGL directx vs openGl

This topic is 404 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i know there are a lot of topics in internet about which one is better or in which field which one is better, but i dont know the exact answer. i think these questions are mostly about exprience. and i want to know your exprience.

 

1) i read an article about valve engineers. it said opengl is faster than directx even on windows. is that true?

 

2) its said in directx programmer has more controll rather than opengl.

 

3) which one give better visuals about sahders or technology they use? is it make difference or that is all the same and depend only on programmer that work on them? what about built in effects, particles, lightening,...

4)as I searched in internet, there is no much difference between them, so why Microsoft introduced directx when there was opengl? or why is still developing it? a developer can use opengl for all platforms and forget pain of using a single platform api.

5) I see in engines like unity or unreal that says dx11 version or... it seems using new directx gives more important features. what are those features that can only be used on windows or xbox? are they just for editor or for last output game?

6) what is given in every update of those api,s? for example what is difference of dx10 and dx11? is this about new tools and functions or math or something else? so when in a graphic card is written it supports dx11 what does it mean?

thank you for helping

Edited by moeen k

Share this post


Link to post
Share on other sites
Advertisement

4)as I searched in internet, there is no much difference between them, so why Microsoft introduced directx when there was opengl? or why is still developing it? a developer can use opengl for all platforms and forget pain of using a single platform api.

I'm not the DX guy any more since changing to OpenGL in the early 2006's but OpenGL was intentially introduced as a graphics state machine a time when Microsoft was on the go for assimilating anything to force people using Windows and only Windows but that is an other story to tell. As far as I have read through the history of GL/DX, it was that GL was not made for high performance realtime graphics rather than be used as replacement for IrisGL from the Silicon Workstations in 1992. Its performance and capabilities were something of crappy and Microsoft decided itself to set a team for developing a counter product called Game SDK and later Direct X includign Direct 3D from version 3.0.

OpenGL itself was less standartised so anyone could develop its own extensions and platform/hardware specific functions for it. This and the lack of support on the early Microsoft Windows systems made developers go for Direct X instead even on the fact that Windows was the onlyx OS on Intel Computers that were much cheaper than Apples Macintosh.

OpenGL 2.0 got the shading model but also has had its fixed function pipeline when its legacy functions got depricated in version 3  and removed from 3.3 GL. When CX rises through its versions 7, 8 and 9 GL was fighting with its standards and extensions. In version 4.0 you have feeled 100 times more dynamic bound functions than core functions to use where DX takes this all for you into a code standard API.

 

1) i read an article about valve engineers. it said opengl is faster than directx even on windows. is that true?

Have read the same article but that anyways depends on hardware, what programs run in the background and how is the application coded. Using a wrapper library providing an avarage API for both may have one or the other be a bit faster

2) its said in directx programmer has more controll rather than opengl.

From my research this was true. When DX introduced command buffers for rendering OpenGL still seperates some management tasks from the user but Vulkan and DX 12 are now similar in there capabilities

3) which one give better visuals about sahders or technology they use? is it make difference or that is all the same and depend only on programmer that work on them? what about built in effects, particles, lightening

I think because of the history of both, DX hase more tutorials and books when some informations on GL are hard to find but on the other hand GL is a totally open standard when Microsoft dosent need to publish DX informations that go beyond how you use it

6) what is given in every update of those api,s? for example what is difference of dx10 and dx11? is this about new tools and functions or math or something else? so when in a graphic card is written it supports dx11 what does it mean?

Graphics cards are like CPUs, you need to know how to talkt to them on the software level. On newer DX versions may be new capabilities introduced that may for example be the command buffer. DX is like GL mostly a hardware driver talking to the GPU, managing memory and whatever so a graphics card that isnt DX11 ready may not understand and fail up to critically crash when instructions go wrong

Share this post


Link to post
Share on other sites

4) Win95 and WinNT both had their own graphics teams - one backed GL and one made their own API, and neither shared, so Windows ended up with both!


This is exactly what I understand the reason to have been from reading Alex St John's blog (http://www.alexstjohn.com/WP/2013/01/09/direct3d-vs-opengl/):

When Eric Engstrom approached the NT team about providing us with an OpenGL library to add 3D support to DirectX 2.0 we were turned down. The Windows NT team did not want Windows 95 to be competitive with Windows NT for professional graphics.


Summary is: Microsoft wanted to break into the professional graphics workstation market with Windows NT and they needed OpenGL in order to do that. So it was very much in Microsoft's best interest - strategically, financially, etc - to have solid OpenGL support.
Their consumer division also needed a 3D API (the first versions of DirectX didn't have a 3D API) but the NT team didn't wish to share, so the consumer team ended up buying up RenderMorphics and basing the first version of Direct3D on their Reality Lab API.
If two divisions of the same company not cooperating in this manner seems surprising, remember: this is Microsoft. If you've ever dealt with them in a professional capacity you'll know that this is exactly how they work.
If you look back at the history of the so-called "API war" all the evidence either supports or - at worst - doesn't contradict this version of events, so it certainly seems credible enough.
Some specific examples.
The first version of Windows 95 didn't have OpenGL; Windows NT 4 didn't have Direct3D.
Microsoft's positioning of OpenGL as a "CAD API" and Direct3D as a "games API".
Microsoft's maneuvering with the OpenGL MCD vs ICD driver model.
It can be popular in some quarters to make claims such as "Microsoft tried to kill OpenGL because they wanted a monopoly over 3D APIs" but the sequence of events as they happened just don't really support that.
-------
Finally, the statement that "a developer can use OpenGL on all platforms" just isn't true anyway. A developer cannot use OpenGL on the major console platforms. A developer can use OpenGL ES on Android (and ES doesn't support all OpenGL features so it's not the same API). OpenGL is a second-class citizen on Apple platforms. So the cross-platform advantage of using OpenGL just isn't actually there.

Share this post


Link to post
Share on other sites

Don't let GL's "portability" argument fool you.

I have to respectfully disagree here.  Every device with a GPU supports OpenGL.  DX is only supported on Windows and XBox.  OpenGL wins portability by a country mile.  Sure, different platforms and different manufacturers implement OpenGL differently, but I've been able to port my OpenGL engine between Objective-C, C#, Java, and Javascript/HTML5 in about a day per platform.

Otherwise, as you noted, they are the same.  For me, it comes down to this : If you are developing only for Windows platforms you should use DX.  Otherwise, you pretty much HAVE to use OpenGL.

Share this post


Link to post
Share on other sites

I have to respectfully disagree here.  Every device with a GPU supports OpenGL.

 

Be very careful. Several people who post on this forum actually have worked with major console devkits and on AAA titles - they have actual hands-on experience of which APIs are used and know what they're talking about.  Others are well-known and well-respected industry figures.  So when one of these people says "not every device supports OpenGL" - they're probably right.

Share this post


Link to post
Share on other sites

 

Every device with a GPU supports OpenGL.

PS4s contain a GPU, but doesn't support OpenGL natively.

 

its psgl but its said basically its some modification of opengl. portability is most obvois difference of dx and opengl. my question was mostly based on performance, quality and ease of use.

Share this post


Link to post
Share on other sites

its psgl but its said basically its some modification of opengl. portability is most obvois difference of dx and opengl. my question was mostly based on performance, quality and ease of use.


PSGL existed on PS3 only (its not on PS4) and was a sub-ES 1.0 (or maybe 1.1) implementation that was a wrapper built on top of it's native API but which nobody used because it's performance and functionality were dreadful.

That's basically where the "PS supports OpenGL" mythology came from.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!