OpenGL
OpenGL is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit, to achieve hardware-accelerated rendering.
Silicon Graphics, Inc. began developing OpenGL in 1991 and released it on June 30, 1992. It is used for a variety of applications, including computer-aided design, video games, scientific visualization, virtual reality, and flight simulation. Since 2006, OpenGL has been managed by the non-profit technology consortium Khronos Group.
Design
The OpenGL specification describes an abstract application programming interface for drawing 2D and 3D graphics. It is designed to be implemented mostly or entirely using hardware acceleration such as a GPU, although it is possible for the API to be implemented entirely in software running on a CPU.The API is defined as a set of functions which may be called by the client program, alongside a set of named integer constants. Although the function definitions are superficially similar to those of the programming language C, they are language-independent. As such, OpenGL has many language bindings, some of the most noteworthy being the JavaScript binding WebGL ; the C bindings WGL, GLX and CGL; the C binding provided by iOS; and the Java and C bindings provided by Android.
In addition to being language-independent, OpenGL is also cross-platform. The specification says nothing on the subject of obtaining and managing an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering, providing no APIs related to input, audio, or windowing.
Development
OpenGL is no longer in active development; whereas between 2001 and 2014, OpenGL specification was updated mostly on a yearly basis, with two releases taking place in 2009 and three in 2010. The latest OpenGL specification 4.6 was released in 2017 after a three-year break, and was limited to inclusion of eleven existing ARB and EXT extensions into the core profile.Active development of OpenGL was dropped in favor of the Vulkan API, released in 2016, and codenamed glNext during initial development. In 2017, Khronos Group announced that OpenGL ES would not have new versions
and has since concentrated on development of Vulkan and other technologies. As a result, certain capabilities offered by modern GPUs, e.g. ray tracing, are not supported by the OpenGL standard. However, support for newer features might be provided through the vendor-specific OpenGL extensions.
New versions of the OpenGL specifications are released by the Khronos Group, each of which extends the API to support various new features. The details of each version are decided by consensus between the Group's members, including graphics card manufacturers, operating system designers, and general technology companies such as Mozilla and Google.
In addition to the features required by the core API, graphics processing unit vendors may provide additional functionality in the form of extensions. Extensions may introduce new functions and new constants, and may relax or remove restrictions on existing OpenGL functions. Vendors can use extensions to expose custom APIs without needing support from other vendors or the Khronos Group as a whole, which greatly increases the flexibility of OpenGL. All extensions are collected in, and defined by, the OpenGL Registry.
The features introduced by each new version of OpenGL are typically formed from the combined features of several widely implemented extensions, especially extensions of type ARB or EXT.
Documentation
The OpenGL Architecture Review Board released a series of manuals along with the specification which have been updated to track changes in the API. These are commonly referred to by the colors of their covers:;The Red Book
;The Orange Book
Historic books :
;The Green Book
;The Blue Book
;The Alpha Book
OpenGL's documentation is also accessible via its official webpage.
Associated libraries
The earliest versions of OpenGL were released with a companion library called the OpenGL Utility Library. It provided simple, useful features which were unlikely to be supported in contemporary hardware, such as tessellating, and generating mipmaps and primitive shapes. The GLU specification was last updated in 1998 and depends on OpenGL features which are now deprecated.Context and window toolkits
Given that creating an OpenGL context is quite a complex process, and given that it varies between operating systems, automatic OpenGL context creation has become a common feature of several game-development and user-interface libraries, including SDL, Allegro, SFML, FLTK, and Qt. A few libraries have been designed solely to produce an OpenGL-capable window. The first such library was OpenGL Utility Toolkit, later superseded by freeglut. GLFW is a newer alternative.- These toolkits are designed to create and manage OpenGL windows, and manage input, but little beyond that.
- Several "multimedia libraries" can create OpenGL windows, in addition to input, sound and other tasks useful for game-like applications
- Widget toolkits
Extension loading libraries
Implementations
is an open-source implementation of OpenGL. It can do pure software rendering, and it may also use hardware acceleration on BSD, Linux, and other platforms by taking advantage of the Direct Rendering Infrastructure. As of version 20.0, it implements version 4.6 of the OpenGL standard.History
In the 1980s, developing software that could function with a wide range of graphics hardware was a challenge without a cross-platform library. Software developers wrote custom interfaces and drivers for each piece of hardware. This was expensive and resulted in multiplication of effort.By the early 1990s, Silicon Graphics was a leader in 3D graphics for workstations. Their IRIS GL API became the industry standard, as IRIS GL was considered easier to use, and it supported immediate mode rendering, therefore being faster than competitors like PHIGS.
SGI's competitors were also able to bring to market 3D hardware supported by extensions made to the PHIGS standard, which pressured SGI to open source a version of IRIS GL as a public standard called OpenGL.
However, SGI had many customers for whom the change from IRIS GL to OpenGL would demand significant investment. Moreover, IRIS GL had API functions that were irrelevant to 3D graphics. For example, it included a windowing, keyboard and mouse API, in part because it was developed before the X Window System and Sun's NeWS. IRIS GL libraries were heavily tied into SGI's proprietary graphics hardware and could not be open sourced as-is due to hardware patents and trade secrets. These factors required SGI to continue to support the advanced and proprietary Iris Inventor and Iris Performer programming APIs while market support for OpenGL matured.
One of the restrictions of IRIS GL was that it only provided access to features supported by the underlying hardware. If the graphics hardware did not support a feature natively, then the application could not use it. OpenGL overcame this problem by providing software implementations of features unsupported by hardware, allowing applications to use advanced graphics on relatively low-powered systems. OpenGL standardized access to hardware, pushed the development responsibility of hardware interface programs to hardware manufacturers, and delegated windowing functions to the underlying operating system. With so many different kinds of graphics hardware, getting them all to speak the same language in this way had a remarkable impact by giving software developers a higher-level platform for 3D-software development.
In 1992, SGI led the creation of the OpenGL Architecture Review Board, the group of companies that would maintain and expand the OpenGL specification in the future. Two years later, they also played with the idea of releasing something called "OpenGL++" which included elements such as a scene-graph API. The specification was circulated among a few interested parties – but never turned into a product.
Released in 1996, Microsoft's Direct3D eventually became the main competitor of OpenGL. Over 50 game developers signed an open letter to Microsoft, released on June 12, 1997, calling on the company to actively support OpenGL. On December 17, 1997, Microsoft and SGI initiated the Fahrenheit project, which was a joint effort with the goal of unifying the OpenGL and Direct3D interfaces. In 1998, Hewlett-Packard joined the project. It initially showed some promise of bringing order to the world of interactive 3D computer graphics APIs, but on account of financial constraints at SGI, strategic reasons at Microsoft, and a general lack of industry support, it was abandoned in 1999.
In July 2006, the OpenGL Architecture Review Board voted to transfer control of the OpenGL API standard to the Khronos Group.
Industry support
Despite the emergence of newer graphics APIs like its successor Vulkan or Metal, OpenGL continues to be a widely used standard. This continued relevance is supported by several factors: ongoing development with new extensions and driver optimizations, its cross-platform compatibility, and the availability of compatibility layers like ANGLE and Zink. These layers allow OpenGL to run efficiently on top of Vulkan and Metal, offering a pathway for continued use or gradual transitions for developers.However, the graphics API landscape has been shifting, where some companies are moving away from OpenGL. Back in June 2018, Apple has deprecated OpenGL APIs on all of their platforms, strongly encouraging developers to use their proprietary Metal API, which was introduced in 2014.
Game developers have also begun to adopt newer APIs. id Software, who has been using OpenGL in their games since the late 1990s in games such as GLQuake or some games of the Doom franchise, transitioned away to its successor Vulkan in its id Tech 7 engine in 2016. They first supported Vulkan in an update for their id Tech 6 engine. The company's first licensed use of OpenGL was in its Quake II engine, also known as id Tech 2. In March 2023, Valve removed OpenGL support from Dota 2 in favor of Vulkan. Atypical Games, with support from Samsung, updated their game engine to use Vulkan, rather than OpenGL, across all non-Apple platforms.
The Khronos Group, the consortium responsible for OpenGL's development, has stopped updating OpenGL with the last release made in 2017. It has not received a number of modern graphics technologies, such as hardware accelerated Ray Tracing, on-GPU video decoding, and advanced anti-aliasing algorithms
like Nvidia DLSS and
Google's Fuchsia OS, while using Vulkan natively and requiring a Vulkan-conformant GPU, still intends to support OpenGL on top of Vulkan via the ANGLE translation layer.