User:ScotXW/Rendering APIs


 * We have 3D geometry and lightning data and some texture data, and would to like to create, i.e. calculate, 2D pictures based on that data plus user input ("movement" inside the game). And would like to offload some or all of this calculations to something other then the CPU. And we would like some cross-hardware, cross-platform API for that. Cf. QuakeCon 2012 – John Carmack on the principles of Lighting and Rendering – what is rendering? a straight forward explanation by John Carmack

OpenGL is an API to enable game engines to outsource computations regarding the rendering of 3D-data via Rasterisation (or via Ray-tracing?) to the GPU


 * User:Soumyasch/Incubator/DirectX

OpenGL vs Direct3D

 * 1996-12-23 John D. Carmack: http://www.bluesnews.com/archives/carmack122396.html
 * 1997-04 Chris Hecker: http://chrishecker.com/images/3/33/Gdmogl.pdf
 * 2008-07-15: Rage is still OpenGL (Rage, October 4, 2011)
 * 2010-01-08 David Rosen: Why you should use OpenGL and not DirectX
 * 2010-01-27 David Rosen: DirectX vs. OpenGL revisited
 * 2013-03-14 Nicol Bolas: Technical history of OpenGL and Direct3D
 * Note Nicol confuses the ARB with Khronos Group! Khronos took over in July 2006, so it was them, who delayed OpenGL 3 that long!
 * 2014-06-08 Alex St. John: “OpenGL has been held hostage by CAD companies for over a decade. That is why ES was created”
 * Alex St. John was/is technology evangelist for DirectX! Yet his assertion regarding "OpenGL and CAD" could be right; but even if the claim was right, that would not make Direct3D better then OpenGL! As a matter of fact, OpenGL 4.5 with EXT has the edge over Direct3D 11.2! See "zero driver-overhead".
 * Now, that we stopped allowing Microsoft to bamboozle us even further with their crap, let's look at the actual competitors of OpenGL in the gaming market and compare:
 * Compare OpenGL 4.5 + EXT with Mantle and Sony's GNM & GNMX
 * Compare GLSL with PSSL
 * Adoption of Direct3D 10 after its release

SDD 2014 January

 * 2014-01-15 at SDD – / Slides by Cass Everitt & John McDonald (Nvidia)
 * Efficient Buffer Management, McDonald 2012, for correct management of buffers with fencing; Efficient Texture Management, or "how to manage all texture memory myself"
 * Moving Your Games to OpenGL

GDC 2014 March

 * 2014-03-20 at GDC2014 – Approaching zero driver overhead Cass Everitt & John McDonald (Nvidia), Graham Sellers (AMD) and Tim Foley (Intel)

Mantle & OpenGL 5.0?

 * 2014-06-03: Apple introduces Metal
 * Some guy: the problem is not that the drivers are sending millions of additional opcodes trashing the command dispatchers or not using certain optimized paths as suggested in the "Approaching zero driver overhead" talk at GDC2014!
 * Problem is, that PCIe induces too high a latency and does still not have enough bandwidth??? As a result uploads to graphics memory take longer time (bandwidth) and blocks the CPU (latency). Me: does it block all CPUs? Cannot this uploads be marshalled?
 * Current OpenGL game: upload TextureA, wait for upload to finish, then tell GPU to process TextureA, then upload TextureB, wait for upload to finish , then tell GPU to process TextureB, and finally render.
 * Next Gen OpenGL game: upload Textures A,B,..,N to buffers A,B,..,N only once per scene (me: is this a game level?), wait for upload to finish, reference buffer A, process, reference buffer B, process, finally render. ⇒ The time difference induced by the uploading of TexturesB is gone. A big deal to the achieved rendering performance? A big deal to developer-hours-to-results?
 * Of course many more factors need to work that way, the example is just a very bastardised way to show part of the problem.

Current OpenGL drivers do a lot of input validation and take care of resource management (allocation, buffering...). With Mantle, this validation and resource management have become responsibility of the game engine. – Free memory access for everyone everywhere, hooray! The input validation is there for a good reason. In best case, you just hang the hardware and have to reset. More worse, the application gets access to regions it's not allowed. Some causes of driver overhead are "cost of CPU fulfilling the API contract", Vallidation & hazard avoidance!

Much of the work that drivers used to do on an application’s behalf is now the responsibility of the game engine. ... It also means that this work, which must still be done, is done by someone with considerably more information. Because the engine knows exactly what it will do and how it will do it, it is able to make design decisions that drivers could not.


 * http://www.firaxis.com/?/blog/single/why-we-went-with-mantle
 * http://www.oxidegames.com/2014/05/21/next-generation-graphics-apis/
 * http://www.joshbarczak.com/blog/?p=99
 * http://www.engadget.com/2014/01/14/oxide-star-swarm-real-time-strategy-mantle-demo/
 * http://www.pcgamesn.com/amds-mantle-api-how-it-works-and-why-pc-developers-will-adopt-it
 * http://www.amd.com/Documents/Mantle_White_Paper.pdf
 * http://community.amd.com/community/amd-blogs/amd-gaming/blog/2013/10/17/the-four-core-principles-of-amd-s-mantle


 * http://www.khronos.org/news/events/siggraph-vancouver-2014#
 * http://s2014.siggraph.org/

Metal API

 * 2014-06-02: Apple presents Metal API
 * 2014-07-18: Unreal Engine 4.3 supports Apple's Metal API

That video game developers want a new low-level rendering API (be it named OpenGL 5, Direct3D 12 or Mantle or Metal) for non-consoles has been known for years....!!!!
 * AMD's Mantle was announced at the AMD Developer Summit (APU) in November 2013. As of July 2013 this API is hardware specific.
 * Apple's Metal was announced in June 2014. As of July 2014 this API is specific to OS X and iOS.
 * OpenGL 4.5/5.0 will be introduced at SIGGRAPH in August 2014, and hopefully its implementation will be made available for multiple hardware and multiple operating systems.

While AMD may have an interest in bringing Mantle to Linux (and possible other OSes), even releasing the specifications, it is unlikely that Apple will do that with Metal. So Metal could be viewed as yet another unique selling proposition for the Apple walled garden. Except that it is not unique. It was announced in June 2014, while Metal was announced in November 2013 and OpenGL 5 in August 2014.

It rather the other way around: Apple's actual dray-horse is their digital distribution platform for the iOS. This makes it fairly easy to monetize programming efforts, even books. All the software developers who do lack of better software distribution, might swallow Metal along the way using the Apple digital distribution platform, hence furthering walled garden-features with vendor lock-in. Looking at the crappy OpenGL implementation on OS X, even serious video game developers might swallow Metal, convince yourselves: Ubuntu With Linux 3.16 Smashes OS X 10.9.4 On The MacBook Air. Back in the day, Microsoft spread FUD about the support for OpenGL in Windows Vista with the intention to weaken OpenGL, see Why you should use OpenGL and not Direct3D!!!

Any additional rendering API to be supported, only increases development expenditures while bringing not advantages at all to ISVs!!!

Back in the day, Microsoft could push their proprietary & available for Microsoft-platforms-only stuff, because of their huge installed base. Microsoft Windows came pre-installed, one was forced to search very hardly to find hardware, that would come without a pre-installed Microsoft Windows. Today, in the mobile market, Apple could do the same with their digital distribution platform. Google Play is the only serious competitor, and a very successful one: File:World Wide Smartphone Sales.png, File:World Wide Smartphone Sales Share.png.

Do we need more successful digital distribution platforms? More competition will definitely not hurt the end-user! And this is another point: what is there for plain Linux? AFAIK, there is Steam and the Ubuntu Software Center, which can distribute software for money. Google Play is Android-only, it is e.g. not available for Debian or Fedora.

Instead of trying to compete with Red Hat (the systemd vs. Upstart-crap in Debian, Mir (software) vs. Wayland, etc. Canonical SHOULD HAVE concentrated on developing and establishing such another digital distribution platform! Sadly they rather play stupid useless crap.