PDA

View Full Version : OpenGL open implementaion



aditbhatia
05-29-2016, 08:09 AM
Hi,
I would like to know the source code repository for openGL implementation. Is openGL API implementation entirely up to GPU driver developers or is there some open source implementation.

GClements
05-29-2016, 09:44 AM
In most implementations, rasterisation is performed by hardware; the software part is mostly about tracking state and issuing commands to the hardware.

For an implementation which includes software rasterisation, look at Mesa (http://www.mesa3d.org/).

mhagain
05-29-2016, 10:44 AM
The "open" in OpenGL has nothing whatsoever to do with "open source" - OpenGL actually pre-dates the open source movement (1992 (https://en.wikipedia.org/wiki/OpenGL#Version_history) vs 1998 (https://en.wikipedia.org/wiki/Open-source_movement#Brief_history)). What OpenGL is is an open standard (https://en.wikipedia.org/wiki/Open_standard). Unfortunately the presence of the word "open", together with the fact that OpenGL drivers are available for Linux, seems to have led to this confusion: a classic case of adding two and two and getting five.

As a general rule OpenGL is implemented by your GPU vendor. It's part of the device driver for your hardware, and it's primary task is to act as a translation layer between your program and your hardware. Your program makes hardware-independent OpenGL calls, the device driver takes those hardware-independent calls and converts them to something hardware-specific, then your GPU does the actual work of drawing something. Don't get the idea that OpenGL is in some way a software library because it's not.

Exceptions exist. As already mentioned, Mesa is a pure software implementation. Microsoft ship their own software implementation with Windows. ANGLE (https://en.wikipedia.org/wiki/ANGLE_%28software%29) is a software wrapper around Direct3D. And sometimes a vendor will provide a software emulated path rather than a hardware accelerated one for features which their hardware doesn't support but which the OpenGL spec mandates their driver must provide.

Hermannicus
05-29-2016, 12:40 PM
If you want to validate your GLSL code, there is also a reference implementation for GLSL.

Look here: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/