OpenGL facts for kids
![]() |
|
![]() A diagram of how video games on Linux outsource real-time rendering calculations to a GPU using OpenGL.
|
|
Original author(s) | Silicon Graphics |
---|---|
Developer(s) | Khronos Group (formerly ARB) |
Initial release | June 30, 1992 |
Stable release | |
Written in | C |
Successor | Vulkan |
Type | 3D graphics API |
License |
|
OpenGL (which stands for Open Graphics Library) is like a special set of instructions that helps computers draw amazing 2D and 3D pictures. Think of it as a language that computer programs use to talk to your computer's graphics card (the GPU). This allows games and other apps to create cool visuals quickly and smoothly.
Silicon Graphics, Inc. (SGI) started creating OpenGL in 1991, and it was officially released on June 30, 1992. It's been used in many different areas, like designing cars and buildings (CAD), making video games, showing scientific data, and even in virtual reality and flight simulators. Since 2006, a group called the Khronos Group has been in charge of OpenGL.
Contents
How OpenGL Works
OpenGL is a set of rules that tells your computer how to draw graphics. It's designed to work best with special hardware, like your computer's graphics card (GPU). This makes drawing super fast! Even though it's usually done with hardware, it can also work using just your computer's main processor (CPU).
The instructions in OpenGL are like a collection of functions that a program can call. These functions are similar to those in the C programming language, but they can be used with many other programming languages too. For example, JavaScript uses a version called WebGL for 3D graphics in web browsers.
OpenGL is also "cross-platform," meaning it works on different types of computers and operating systems. It focuses only on drawing graphics and doesn't handle things like sound or how windows appear on your screen.
Developing OpenGL
OpenGL isn't being actively updated with big new features anymore. Between 2001 and 2014, it got new updates almost every year. However, the last major update, version 4.6, came out in 2017.
The focus for new graphics technology has shifted to a newer system called Vulkan, which was released in 2016. The Khronos Group announced in 2017 that they wouldn't be releasing new versions of OpenGL ES (a version for smaller devices). This means some very new graphics features, like ray tracing (which makes light and shadows look super realistic), aren't directly supported by OpenGL. However, graphics card makers can add these features through special "extensions."
New versions of OpenGL were decided by the Khronos Group, which includes companies that make graphics cards, operating systems, and other tech. These companies work together to agree on what new features to add.
Graphics card makers can also add their own special features to OpenGL, called extensions. These extensions can add new functions or change how existing ones work. This allows companies to offer unique capabilities without needing everyone else's approval, making OpenGL very flexible.
Learning About OpenGL
The OpenGL Architecture Review Board created a series of helpful books that explain how to use OpenGL. These books are often known by the color of their covers:
- The Red Book: This is the main guide for learning OpenGL. It helps you understand how to program with it.
- The Orange Book: This book focuses on GLSL, which is a special language used to create advanced visual effects called "shaders."
There were also older books that helped people use OpenGL with specific computer systems like X Window System or Microsoft Windows.
You can also find lots of information and guides on OpenGL's official website.
Helpful Tools for OpenGL
Early versions of OpenGL came with a helpful tool called the OpenGL Utility Library (GLU). It provided simple features that were hard for computers to do back then, like creating complex shapes or different versions of textures.
Tools for Windows and Contexts
Creating an OpenGL window on your screen can be tricky because it's different for each operating system. So, many game development and user interface tools now help you create these windows automatically. Some popular ones include SDL, Allegro, SFML, and Qt.
There are also tools made just for creating OpenGL windows:
- GLFW: This tool helps create windows and handle input from your keyboard, mouse, and joysticks. It's often used for games.
- freeglut: This is a newer, more stable version of an older tool called GLUT. It helps with windows and input.
- OpenGL Utility Toolkit (GLUT): This is an older tool for windows that isn't updated anymore.
Other "multimedia libraries" can also create OpenGL windows and handle things like sound, which is useful for games:
- Allegro 5: A tool for game development that works on many different computer systems.
- Simple DirectMedia Layer (SDL): Another tool for multimedia that works across different platforms.
- SFML: A multimedia tool that works with many programming languages.
Tools for Extensions
Because finding and loading OpenGL extensions can be a lot of work, some tools were created to do it automatically. Examples include GLEW and glbinding. Many programming language tools for OpenGL, like Java OpenGL, also load extensions automatically.
OpenGL Programs
Mesa 3D is a free and open-source program that acts like OpenGL. It can draw graphics using just software, or it can use your computer's graphics card for faster drawing on systems like Linux. As of version 20.0, Mesa supports OpenGL version 4.6.
History of OpenGL
In the 1980s, it was very hard to make software that worked with all the different kinds of graphics hardware. Developers had to write special code for each piece of hardware, which was expensive and took a lot of effort.
By the early 1990s, Silicon Graphics (SGI) was a leader in 3D graphics. Their special set of instructions, called IRIS GL, became very popular because it was easy to use and fast.
Other companies started making their own 3D hardware, which put pressure on SGI. So, SGI decided to make a version of IRIS GL available to everyone as a public standard, and they called it OpenGL.
One great thing about OpenGL was that it could draw advanced graphics even if the computer's hardware didn't directly support those features. OpenGL would use software to make up for what the hardware couldn't do. This made it much easier for software developers to create 3D programs because they had a standard way to talk to different graphics cards.
In 1992, SGI helped create the OpenGL Architecture Review Board (OpenGL ARB), a group of companies that would manage and improve OpenGL.
Later, Microsoft's Direct3D became a big competitor to OpenGL. Many game developers even signed a letter in 1997 asking Microsoft to keep supporting OpenGL. Microsoft and SGI tried to work together on a project called Fahrenheit to combine OpenGL and Direct3D, but it didn't work out and was stopped in 1999.
In July 2006, the OpenGL Architecture Review Board decided to give control of OpenGL to the Khronos Group.
Who Uses OpenGL Today?
Even though newer graphics systems like Vulkan and Metal exist, OpenGL is still widely used. This is because it keeps getting updates and improvements, works on many different computer systems, and has special tools like ANGLE and Zink that let it run efficiently on top of newer systems like Vulkan. This helps developers continue using OpenGL or slowly switch to newer technologies.
However, some companies are moving away from OpenGL. In June 2018, Apple stopped actively supporting OpenGL on its devices (iOS, macOS, and tvOS). They now encourage developers to use their own system called Metal.
Game developers are also adopting newer systems. id Software, known for games like GLQuake and Doom, started using Vulkan in their game engines in 2016. In March 2023, Valve removed OpenGL support from their game Dota 2 in favor of Vulkan.
The Khronos Group, which manages OpenGL, has stopped adding many modern graphics features to it, such as hardware-accelerated Ray Tracing and advanced anti-aliasing techniques like Nvidia DLSS.
Google's Fuchsia operating system uses Vulkan, but it still plans to support OpenGL through the ANGLE tool.
OpenGL Versions
The first version of OpenGL, version 1.0, was released on June 30, 1992. Since then, new versions have been released to add more features. Each new version usually includes features that were popular as "extensions" in previous versions.
OpenGL 2.0
Released on September 7, 2004, OpenGL 2.0 brought a big change: the OpenGL Shading Language (GLSL). This allowed developers to write special programs called "shaders" in a C-like language. Shaders create advanced visual effects, replacing older, less flexible ways of drawing.
OpenGL 3.0 and Beyond
OpenGL 3.0, released on August 11, 2008, introduced a way to simplify future updates. Some older features were marked as "deprecated," meaning they would eventually be removed. This allowed OpenGL to move forward with new technologies.
Later versions, like OpenGL 3.1 (March 24, 2009) and 3.2 (August 3, 2009), continued to refine this process, separating features into "core" (new) and "compatibility" (older) groups.
OpenGL 4.0 and Newer
OpenGL 4.0 was released on March 11, 2010. It was designed to work with newer graphics hardware, similar to what Direct3D 11 could do. This version added many small but important features to take advantage of modern graphics cards.
Newer versions like 4.1 (July 26, 2010), 4.2 (August 8, 2011), 4.3 (August 6, 2012), 4.4 (July 22, 2013), 4.5 (August 11, 2014), and 4.6 (July 31, 2017) continued to add more powerful features. These included things like:
- Compute shaders: Allowing the GPU to do general calculations, not just graphics.
- Improved texture compression: Making graphics files smaller without losing quality.
- Better debugging tools: Helping developers find and fix problems in their code.
- Direct State Access (DSA): Making it easier and faster to change how objects are drawn.
- SPIR-V shaders: A new way to write shaders that can work on different systems.
- Improved anisotropic filtering: Making textures look better when viewed at an angle.
Other Ways to Use OpenGL
Apple has moved away from OpenGL on its devices like iOS and macOS, preferring its own system called Metal. However, OpenGL 4.1 is still available on macOS. There are also special tools, like MoltenGL, that can translate OpenGL commands into Metal commands.
Several projects are working on making OpenGL run on top of Vulkan. For example, Google's ANGLE can make OpenGL ES 3.1 work with Vulkan. The Mesa3D project also has a tool called Zink that does this.
Microsoft's Windows 11 on Arm computers also supports OpenGL 3.3 by using a system called GLon12, which runs OpenGL on top of DirectX 12.
Vulkan: The Next Step
Vulkan was once called the "Next Generation OpenGL Initiative" (glNext). It's a completely new system designed to combine OpenGL and OpenGL ES into one powerful tool. It's not directly compatible with older OpenGL versions, but it offers much more control over the graphics hardware.
The first version of Vulkan was released on February 16, 2016.
See also
In Spanish: OpenGL para niños
- Direct3D – OpenGL's main competitor
- Metal (API) – Apple's graphics system for its devices
- OpenGL ES – A version of OpenGL for smaller, embedded devices
- Vulkan – The newer graphics system that is replacing OpenGL
- WebGL – OpenGL for web browsers