Jump to content
  • Advertisement
elgun

Why we have a lot of 3d graphic APIs?

Recommended Posts

There are dozens of 3D graphics APIs. For example, OpenGL, Direct3D, GNM, LibGCM, OpenGLES, Vulkan, Mantle, Metal.

And all of them are created for the same purpose: hardware accelerated rasterization. And all of them are using the same techniques (algorithms) for rasterization, there is no difference between them, except apis'. Why we humans reinventing the wheel? This makes cross platform game development very hard. Because you must learn all of them, and create abstraction layer on top of them. Even shading languages are different. You must create source-to-source transpiler for solving this problem.

Sorry for the my bad english. I hope I expressed myself. Thanks.

Share this post


Link to post
Share on other sites
Advertisement

At the risk of stating the obvious, and not mentioning any names, but some would say that the primary raison d'etre of some of these is precisely TO make cross platform development hard, and vendor lock-in both for developers and players. :)

Share this post


Link to post
Share on other sites

There are big differences between high level and low level APIs - big enough to justify multiple APIs in case of GL/DX11 vs. VK/DX12. Console APIs can have even more low level features.

Beyond that most APIs are tied to a unique platform. Apple does not want to support Windows, Windows does not want to support Linux or Sony, etc. So Khronos APIs are the only ones targeted at multi platform development, but MS / Sony may not want to support that either, for obvious reasons.

Share this post


Link to post
Share on other sites

First of all, there are ownerships and royalties using the API. Remember the Google-Oracle lawsuit which is still going on regarding the API use. API may, or may not, be copyrightable, but I don't think too many people want to get risked of being sued by any of the tech giants.

Using royalties-free API would of course make you free from those problems, still there are legal stuffs that you have to work with....

Secondly, general use API like DirectX, OpenGL, and Vulkan are designed with supporting as many hardware as possible. That doesn't sound when you have a handful of hardware to support, ie. PlayStation 4 or Nintendo Switch. I think for the platform owner, creating their own API makes them able to control the design of the api so it works well with the hardware. In fact, I think many Console's API are just a very thin wrapper around the hardware/driver.

Also they can eliminate the API's compatibility certification altogether.  Well at least I don't think PS4 needs LibGCM's compatibility certificate....

Lastly, probably the politics. ... Especially in the desktop-mobile area. Windows have support OpenGL before MS create DirectX (correct me if I'm wrong), and looks like they tried hard to deprecate it (not success it seems). Mac OSX also has support for OpenGL before Apple creates Metal. AMD creates Mantle because they want to win over Nvidia in terms of performance. Although they did not success doing so, Mantle was used as a baseline of creating Vulkan. Vulkan is pushed by Khronos group, which basically a group of hardware manufacturer, to balance the power between the platform owner (MS, Apple, Google) and the hardware vendors. 

PS. Please don't be sorry about your English. Mine is much worse :D

Share this post


Link to post
Share on other sites

Also, its more than just re-inventing the wheel as not hardware is created equal. As an API designer you want features in the API to map directly to the HW as much as possible ( efficiency ), but with numerous different HW configuration, this is no easy task. Which then spawn the next issue, in order to be as efficient as possible on platform/hw that doesn't have direct mapping for API features, 'hacks' are then introduced into the API which muddies the interface and introduce unnecessary complexity.
However, the biggest reason, imo and others have mentioned this above is politics...

Share this post


Link to post
Share on other sites

Three reasons come to mind...

1)  An API that works for a desktop or laptop might be too heavy for a mobile device so a lite version is used.  Example would be OpenGL and OpenGLES.

2) An API eventually becomes so out of date that the time has come start over from scratch( sometimes recycling code if it makes sense ).  I assume that this might be the case for OpenGL and Vulkan, with OpenGL being kept on for legacy while Vulkan is for new projects going forward.

3) A company needs an API that they can trust and control, and not have the rug pulled out from under their feet to safe guard the service life for a product.  Microsoft has DirectX and I think Apple now has a new API called Metal.

Edited by Anri

Share this post


Link to post
Share on other sites

I would say that is a healthy competition for the market. Everyone wants their own piece of pie, and people prefer the ones who can offer more utility, compatibility, ease of access. 

That is driving them to compete with each other and push toward more features, even if it seems that they use the same algorithms, the applicability is still varies depending on the platform, and one is better than the other in different fields. 

Various capacities for rendering allows to not depend on one monopolized setting, and it is healthy for the market, for the developers and overall, when one goes down, there are others to fill the gap. 

Share this post


Link to post
Share on other sites

Certainly it is not all politics by any stretch of the imagination, and I agree that GL in particular has been plagued by a lot of historical cruft, however what I personally find notable is that DirectX has not been an open standard.

It is a difficult problem, as the fundamental techniques used to create 3d graphics have changed so much over the years (and will no doubt continue to change). There seems to be both a need to have a stable longterm high level API where perhaps some performance / access to techniques could be sacrificed, and a need for a changing lower level API that can 'throw out the last version' and have the most suitable access to the latest hardware paradigm (or multiple high / low level APIs).

My personal preference would be for some stable higher level APIs that 'translate' down to the some more changing lower level APIs that are also accessible. And for the APIs to be as open as possible, i.e. free to use and not patent encumbered, and not governed by any one company, although I understand the perils of design by committee. Another thing I would like is the option for standardised feature sets, so it would be possible to target a certain minimum feature set and be sure they were supported by the hardware.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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!