OpenGL
By Khronos Group
OpenGL is a cross-platform, cross-language application programming interface for rendering 2D and 3D vector graphics by issuing commands to a graphics processing unit. Originally developed by Silicon Graphics and now maintained by the…
Definition
OpenGL is a cross-platform, cross-language application programming interface for rendering 2D and 3D vector graphics by issuing commands to a graphics processing unit. Originally developed by Silicon Graphics and now maintained by the Khronos Group, it defines a standardized way for software to describe geometry, textures, shaders, and rendering state so that a GPU driver can turn that description into pixels on screen. OpenGL has been a foundational graphics API across workstations, games, CAD software, and embedded systems for decades.
Overview
OpenGL was created in the early 1990s to solve the problem that graphics hardware vendors each had their own proprietary rendering interfaces, which meant software written for one vendor's workstation graphics card would not run on another's without significant rework. Silicon Graphics opened up its internal IRIS GL interface as OpenGL, offering a vendor-neutral specification that any hardware maker could implement a driver for, which let application developers target one API and rely on the driver to map it onto whatever GPU was actually installed. Mechanically, an OpenGL application works as a state machine: the application issues a sequence of calls that set rendering state (which texture is bound, which shader program is active, what the current transformation matrices are) and then submits draw calls that tell the GPU to rasterize geometry using that state. Since OpenGL 2.0, most of the actual per-vertex and per-pixel computation is handled by small programs called shaders, written in GLSL, which run on the GPU itself and give developers direct control over lighting, geometry transformation, and pixel color calculation. The driver translates this sequence of state changes and draw calls into whatever native instructions the specific GPU understands. OpenGL's most direct successor and philosophical opposite is Vulkan, also from Khronos, which exposes GPU hardware at a much lower level, giving applications explicit control over memory, synchronization, and command submission in exchange for far more code and complexity; OpenGL's higher-level, implicit state-machine model is easier to learn and use but leaves more performance-relevant decisions to the driver. On non-open platforms, Microsoft's Direct3D plays a similar role to OpenGL but is Windows- and Xbox-specific, while Apple has pushed its own Metal API and deprecated OpenGL support on its platforms in favor of it. In practice, OpenGL has been used across games (especially cross-platform and older titles), CAD and 3D modeling software, scientific visualization, and embedded and automotive graphics through its OpenGL ES variant, which strips the API down for mobile and embedded GPUs. Many long-lived engines and applications still carry OpenGL rendering backends because of its broad legacy hardware and OS support and comparatively simpler programming model. The main trade-off is that OpenGL's implicit state machine and driver-managed scheduling make it harder to extract peak performance from modern multi-core CPUs and GPUs compared to explicit APIs like Vulkan or Direct3D 12, and its extension mechanism has, over time, produced a somewhat fragmented feature landscape across vendors and driver versions. Projects that need maximum control over GPU scheduling and memory, or that must target Apple's newer platforms, increasingly move to Vulkan, Metal, or Direct3D instead.
Specification
- Cross-platform API supported on Windows, Linux, macOS (legacy), and embedded systems
- State-machine programming model for rendering commands
- GLSL shader language for programmable vertex and pixel computation
- OpenGL ES variant tailored for mobile and embedded GPUs
- Broad legacy hardware and driver support across vendors
- Extension mechanism allowing vendors to expose additional GPU features
- Long-standing standardization by the Khronos Group