kids encyclopedia robot

OpenGL facts for kids

Kids Encyclopedia Facts
Quick facts for kids
OpenGL
OpenGL logo (2D).svg
Linux kernel and OpenGL video games.svg
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; 32 years ago (1992-06-30)
Stable release
4.6 Edit this on Wikidata / Error: first parameter is missing. ()
Written in C
Successor Vulkan
Type 3D graphics API
License
  • Open source license for use of the Sample Implementation (SI): This is a Free Software License B closely modeled on BSD, X, and Mozilla licenses.
  • Trademark license for new licensees who want to use the OpenGL trademark and logo and claim conformance.

OpenGL (which stands for Open Graphics Library) is a special set of instructions that helps computers draw amazing 2D and 3D pictures. Think of it as a language that software uses to talk to your computer's graphics card.

This "language" is used by many different programming languages and works on many types of computers. It helps programs, like video games, tell the GPU (your computer's graphics brain) how to create images very quickly. This makes games and other graphics-heavy apps run smoothly.

A company called Silicon Graphics, Inc. (SGI) started creating OpenGL in 1991. It was officially released on June 30, 1992. Today, OpenGL is used in many areas, including computer-aided design (CAD), video games, scientific visualization, and virtual reality. Since 2006, a group called the Khronos Group has been in charge of OpenGL.

How OpenGL Works

Pipeline OpenGL
An illustration of the graphics pipeline process

OpenGL is like a blueprint for drawing 2D and 3D graphics. It's designed to use your computer's special graphics hardware, like the GPU, to make images super fast. However, it can also work using just the main computer processor (CPU) if needed.

The way OpenGL works is through a collection of commands, or "functions," that computer programs can call. It also uses special numbers that have names, like GL_TEXTURE_2D. Even though these commands look a lot like the C programming language, they can be used with many other languages.

For example, JavaScript uses a version called WebGL to draw 3D graphics right in your web browser. Other versions work with Java and on mobile devices like Android and iOS.

OpenGL is also "cross-platform," meaning it works on different operating systems. It focuses only on drawing pictures. It doesn't handle things like sound, keyboard input, or creating windows on your screen. Other parts of your computer system take care of those tasks.

How OpenGL Has Changed

OpenGL is not being actively updated with big new features anymore. Between 2001 and 2014, it received updates almost every year. The last major update, OpenGL 4.6, came out in 2017.

The Khronos Group decided to focus on a newer, more advanced graphics tool called Vulkan. Vulkan was released in 2016. Because of this, some of the newest graphics features, like ray tracing, are not supported by OpenGL.

Graphics card makers and software companies work together in the Khronos Group to decide on new OpenGL versions. They add new features to the API.

Besides the main features, graphics card companies can add their own extra features called "extensions." These extensions can add new commands or change how existing ones work. This makes OpenGL very flexible. All these extensions are listed in the OpenGL Registry.

Each extension has a short code, like NV for Nvidia. If many companies agree on a feature, it might get an EXT code. If the Khronos Group officially approves it, it gets an ARB code. New versions of OpenGL often include features that started as popular ARB or EXT extensions.

Helpful Books

The people who created OpenGL also released some helpful books. These books explain how to use OpenGL and have been updated over time. They are often known by the color of their covers:

  • The Red Book: This is the main guide for learning OpenGL. It covers how to program with OpenGL version 4.5.
  • The Orange Book: This book is a guide for GLSL, which is a special programming language used with OpenGL to create cool visual effects.

Extra Tools for OpenGL

Early versions of OpenGL came with a helper library called the OpenGL Utility Library (GLU). It had simple tools for things like creating complex shapes or different versions of textures. GLU is quite old now and uses parts of OpenGL that are no longer common.

Tools for Windows and Contexts

Creating an OpenGL window can be tricky because it's different on each operating system. So, many game development and user interface tools help with this. Some popular ones include SDL, Allegro, SFML, FLTK, and Qt.

Some libraries are made just for creating OpenGL windows:

  • GLFW: This tool helps create windows and handle input from keyboards, mice, and joysticks. It's great for games.
  • freeglut: This is a newer, more stable version of an older tool called GLUT. It also handles windows and input.
  • OpenGL Utility Toolkit (GLUT): This is an older window handler that is no longer updated.

Other "multimedia libraries" can also create OpenGL windows and handle sound and other tasks useful for games:

  • Allegro 5: A tool for game development that works on many systems.
  • Simple DirectMedia Layer (SDL): Another tool for games that works on many systems.
  • SFML: A tool for games with a C++ programming language focus.

Libraries for Extensions

Finding and loading OpenGL extensions can be a lot of work. So, some libraries were made to do this automatically. Examples include OpenGL Extension Wrangler Library (GLEW) and glbinding. Many programming language connections, like JOGL and PyOpenGL, also load extensions automatically.

Different Versions of OpenGL

Glxinfo example screenshot
Screenshot of glxinfo, showing information of Mesa implementation of OpenGL on a system

Mesa 3D is an open-source version of OpenGL. It can draw graphics using only software, or it can use hardware acceleration on systems like Linux. Mesa 3D supports the latest OpenGL standard, version 4.6.

History of OpenGL

In the 1980s, it was hard for software to work with all the different graphics hardware. Developers had to write custom code for each piece of hardware, which took a lot of time and money.

By the early 1990s, Silicon Graphics (SGI) was a leader in 3D graphics. Their special tool, IRIS GL, became the industry standard. It was easier to use than other options at the time.

SGI's rivals also started making 3D hardware. This pushed SGI to make a version of IRIS GL available to everyone, which they called OpenGL.

However, IRIS GL had some parts that weren't related to 3D graphics, like tools for windows, keyboards, and mice. Also, SGI couldn't easily make IRIS GL open source due to licensing issues. So, SGI kept supporting their advanced tools while OpenGL became more popular.

One great thing about OpenGL was that it could use software to create features that the graphics hardware didn't support directly. This meant applications could use advanced graphics even on less powerful computers. OpenGL helped standardize how software talked to graphics hardware. It also made hardware manufacturers responsible for creating the necessary device drivers. This change made it much easier for software developers to create 3D programs.

In 1992, SGI helped create the OpenGL Architecture Review Board (OpenGL ARB). This group of companies would manage and improve OpenGL in the future.

In 1996, Microsoft released Direct3D, which became OpenGL's main competitor. Many game developers asked Microsoft to support OpenGL. Later, Microsoft and SGI tried to combine OpenGL and Direct3D into a project called Fahrenheit, but it was stopped in 1999.

In 2006, the OpenGL Architecture Review Board gave control of OpenGL to the Khronos Group.

Industry Support

In June 2018, Apple announced they would no longer actively support OpenGL on their devices (like iPhones and Macs). They encouraged developers to use their own graphics tool called Metal. OpenGL 4.1 from 2011 is the latest version supported on Apple devices.

Many game companies have used OpenGL. id Software used it for games like GLQuake (1997). More recently, they added support for Vulkan in their game engines. Valve also removed OpenGL support from their game Dota 2 in 2023.

The Khronos Group has stopped adding support for new graphics technologies, like Ray Tracing, to OpenGL.

Google's Fuchsia operating system uses Vulkan as its main graphics tool. It plans to support OpenGL by translating OpenGL commands into Vulkan.

OpenGL Versions

The first version of OpenGL, 1.0, came out on June 30, 1992. Since then, new versions have been released to add more features. Each new version includes features that were popular as extensions among graphics card makers.

OpenGL version history
Version Release Date Features
1.1 March 4, 1997 Texture objects, Vertex Arrays
1.2 March 16, 1998 3D textures, BGRA and packed pixel formats
1.3 August 14, 2001 Multitexturing, multisampling, texture compression
1.4 July 24, 2002 Depth textures, GLSlang
1.5 July 29, 2003 Vertex Buffer Object (VBO), Occlusion Queries
2.0 September 7, 2004 GLSL 1.1, MRT, Non Power of Two textures, Point Sprites
2.1 July 2, 2006 GLSL 1.2, Pixel Buffer Object (PBO), sRGB Textures
3.0 August 11, 2008 GLSL 1.3, Texture Arrays, Conditional rendering, Frame Buffer Object (FBO)
3.1 March 24, 2009 GLSL 1.4, Instancing, Texture Buffer Object, Uniform Buffer Object, Primitive restart
3.2 August 3, 2009 GLSL 1.5, Geometry Shader, Multi-sampled textures
3.3 March 11, 2010 GLSL 3.30, Backports as much function as possible from the OpenGL 4.0 specification
4.0 March 11, 2010 GLSL 4.00, Tessellation on GPU, shaders with 64-bit precision
4.1 July 26, 2010 GLSL 4.10, Developer-friendly debug outputs, compatibility with OpenGL ES 2.0
4.2 August 8, 2011 GLSL 4.20, Shaders with atomic counters, draw transform feedback instanced, shader packing, performance improvements
4.3 August 6, 2012 GLSL 4.30, Compute shaders leveraging GPU parallelism, shader storage buffer objects, high-quality ETC2/EAC texture compression, increased memory security, a multi-application robustness extension, compatibility with OpenGL ES 3.0
4.4 July 22, 2013 GLSL 4.40, Buffer Placement Control, Efficient Asynchronous Queries, Shader Variable Layout, Efficient Multiple Object Binding, Streamlined Porting of Direct3D applications, Bindless Texture Extension, Sparse Texture Extension
4.5 August 11, 2014 GLSL 4.50, Direct State Access (DSA), Flush Control, Robustness, OpenGL ES 3.1 API and shader compatibility, DX11 emulation features
4.6 July 31, 2017 GLSL 4.60, More efficient geometry processing and shader execution, more information, no error context, polygon offset clamp, SPIR-V, anisotropic filtering

OpenGL 2.0

Release date: September 7, 2004

OpenGL 2.0 was created to help OpenGL keep up with new graphics needs. It brought in the OpenGL Shading Language (GLSL), which lets developers write special programs called "shaders" to control how graphics look. These shaders are written in a language similar to C.

GLSL was designed to be very advanced, pushing graphics hardware to do more. The final OpenGL 2.0 version included support for GLSL.

OpenGL 3.0

Release date: August 11, 2008

Before OpenGL 3.0, there were big plans for a major overhaul. However, the final version was less revolutionary. It kept some older features but marked them as "deprecated," meaning they might be removed later.

OpenGL 3.0 introduced a way to simplify future updates. Developers could choose to use a "forward-compatible context" which would turn off older, deprecated features. This allowed new software to use the latest features while older software could still run.

Deprecated features included:

  • Older ways of processing graphics (fixed-function).
  • Direct-mode drawing, using commands like glBegin and glEnd.
  • Display lists (a way to store drawing commands).
  • Older versions of OpenGL Shading Language.

OpenGL 3.1

Release date: March 24, 2009

OpenGL 3.1 removed most of the features that were marked as deprecated in version 3.0. From this version on, you generally couldn't use new features with old, deprecated ones at the same time.

OpenGL 3.2

Release date: August 3, 2009

OpenGL 3.2 further divided the specification into a "core profile" and a "compatibility profile." The compatibility profile included the older features that were removed in 3.1, while the core profile did not. OpenGL 3.2 also updated GLSL to version 1.50.

OpenGL 4.0

Release date: March 11, 2010

OpenGL 4.0 was released at the same time as version 3.3. It was made for hardware that could support Direct3D 11, another graphics tool. This version added many extensions to show off the abilities of newer hardware.

OpenGL 4.1

Release date: July 26, 2010

This version improved compatibility with OpenGL ES 2.0, a version of OpenGL for smaller devices.

OpenGL 4.2

Release date: August 8, 2011

Key features included:

  • Support for shaders that can count and change textures.
  • Better ways to draw many copies of objects efficiently.
  • Ability to change parts of compressed textures without reloading the whole thing.

OpenGL 4.3

Release date: August 6, 2012

Key features included:

  • Compute shaders: These let the GPU do general calculations, not just graphics.
  • Shader storage buffer objects: Shaders can read and write to large blocks of memory.
  • ETC2/EAC texture compression: A standard way to compress textures for better performance.
  • Full compatibility with OpenGL ES 3.0 APIs.
  • Debugging tools to help developers find problems.

OpenGL 4.4

Release date: July 22, 2013

Key features included:

  • Better control over how memory is used.
  • More efficient ways to ask the GPU for information.
  • Easier ways to organize variables in shaders.
  • Efficiently connecting multiple objects at once.

OpenGL 4.5

Release date: August 11, 2014

Key features included:

  • Direct State Access (DSA): This makes it easier and faster to change objects without connecting them to the main system.
  • Flush Control: Programs can control when commands are sent to the GPU, helping with multi-tasking.
  • Robustness: Makes the system more stable, especially for web browsers using WebGL.
  • Compatibility with OpenGL ES 3.1 APIs and shaders.

OpenGL 4.6

Release date: July 31, 2017

Key features included:

  • More efficient processing of shapes and shaders on the GPU.
  • More information through statistics and counters.
  • Better performance by reducing error checks.
  • Improved anisotropic filtering for better texture quality.

Other Ways OpenGL Is Used

Microsoft's Windows 11 on Arm devices now supports OpenGL 3.3. It does this by translating OpenGL commands into DirectX 12 commands.

Vulkan

Vulkan is a brand new graphics tool that was designed from scratch. It was once called "Next Generation OpenGL Initiative" (glNext). Vulkan aims to combine OpenGL and OpenGL ES into one common tool. It is not directly compatible with older OpenGL versions.

The first version of Vulkan was released on February 16, 2016.

See also

Kids robot.svg In Spanish: OpenGL para niños

  • Comparison of OpenGL and Direct3D
  • Direct3D – a main competitor of OpenGL
  • Metal (API) – a graphics tool for Apple devices
  • OpenAL – a sound library similar to OpenGL
  • OpenGL ES – OpenGL for smaller devices like phones
  • Vulkan – the newer graphics tool that replaces OpenGL
  • Graphics pipeline
kids search engine
OpenGL Facts for Kids. Kiddle Encyclopedia.