OpenGL (Open Graphics Library) is the most widely used API that is used for creating 2D and 3D computer graphics. It contains over 250 functions that allow users to draw three-dimension scenes from relatively basic primitives. It is most widely used in scientific visualization, information visualization, flight simulation, CAD and virtual reality.

It was first developed in 1992 by Silicon Graphics Inc. Since then, it has been managed by the non-profit consortium known as Khronos Group. It’s direct competitor is Window’s Direct3D. Video game companies either choose to use OpenGL or Direct3D. One of the big advantages of OpenGL is that it is a cross-platform API which means that it isn’t only for Windows.

OpenGL serves two main purposes for developers:

  1. It hides the complexities found when interaction between different 2D accelerators occur by presenting a single interface.
  2. It hides capabilities of different hardware platforms. It requires the support of OpenGL for all hardware.

These two main purposes make it significantly easier for the developer to put a product out in a faster amount of time.

OpenGL has had a lot of significant additions to the development of 3D graphic accelerators. It produces a base level of functionality that is now very common in most hardware. Some of the things it has helped with are:

  • Raterised points, lines and polygons as basic primitives
  • A transform and lightning pipeline
  • Z-buffering
  • Texture mapping
  • Alpha bending

These different things add together to make the 3D design come to life.

OpenGL Graphic Pipeline

  1. Evaluation:  Polynomial functions are evaluated which are responsible for defining inputs. For example, it can approximate curves and the surface of geometry.
  2. Vertex Operations: Transforms and lights the vertex so that it fits within the scene based on the material.
  3. Rasterization: Converts the information into pixels.
  4. Fragment Operations: Updates values depending on incoming and previously stored values.
  5. Fragments are inserted into the frame buffer.

The above is a typical baseline example of how the OpenGL pipeline would function when running 2D and 3D graphics. However, many modern 3D accelerators are able to do a lot more than this to provides the graphics for viewers.