The history of graphics APIs is the history of who holds the sharp objects. In 1992, OpenGL held them for you — the driver managed everything, and you described the world in state changes. In 2016, Vulkan handed them back, along with a thick manual and the polite expectation that you would not cut yourself. Between those two moments sit GLSL, which taught the pipeline to speak a language, and WebGL, which smuggled the whole apparatus into a browser tab. — The right API is the one that matches the sharp objects you want to hold.
Executive Summary — Four Contracts, One Stack
Four Khronos Group contracts sit between your application and the GPU. Each answered a specific failure of the previous. This reference treats them as a single evolving family, not as competing products to rank.
OpenGL — The Foundational API
An open alternative to SGI's proprietary IRIS GL. A state machine: bind a buffer, bind a texture, bind a shader program, issue a draw call. Twenty numbered versions from 1.0 (June 30, 1992) through 4.6 (2017). The ARB handed governance to Khronos in September 2006. OpenGL still runs most of the CAD, scientific visualization, and educational graphics in use today; Khronos has released no new core version since 4.6, concentrating effort on Vulkan.
GLSL — The OpenGL Shading Language
C-like high-level language for shaders. Six programmable stages — vertex, tessellation control, tessellation evaluation, geometry, fragment, compute. GLSL versions ran parallel to GL (1.10 ↔ 2.0, 1.20 ↔ 2.1, …) until GL 3.3 (2010), when the language's version number was realigned to match the host. GLSL 4.60 ships with OpenGL 4.6. A parallel GLSL ES lineage (1.00, 3.00, 3.10, 3.20) services OpenGL ES and WebGL.
glslang (also glslangValidator) is the canonical GLSL → SPIR-V toolchain that bridges GLSL into Vulkan.
Read the full module → M2 — GLSL
WebGL — Graphics on the Web
OpenGL ES exposed to a <canvas> element through a JavaScript API.
WebGL 1.0 shipped in March 2011; WebGL 2.0 (August 2017) tracked OpenGL ES 3.0 and added transform feedback, instancing, multiple render targets, uniform buffer objects, occlusion queries, and 3D textures.
Full cross-browser WebGL 2.0 support only arrived February 9, 2022, when Safari 15 finally shipped it.
Vulkan — The Explicit Modern API
C99 API that cuts the driver to the bone and hands memory, synchronization, and command-buffer scheduling back to the application. Shaders arrive pre-compiled as SPIR-V bytecode, not GLSL source. Explicit memory allocation, explicit pipeline barriers, explicit semaphores between queues, and explicit descriptor sets. Version timeline: 1.0 (2016), 1.1 (2018), 1.2 (2020), 1.3 (2022), 1.4 (2024).
Pipeline & Patterns — Where It All Comes Together
Every GPU implements some variant of the same universal rendering pipeline. Module 5 draws it end-to-end, documents each stage, contrasts the two programming-model archetypes (OpenGL state machine vs Vulkan pipeline state objects), and ends with a twelve-row cross-API terminology map that unifies the vocabulary used across OpenGL, GLSL, WebGL, and Vulkan.
The Universal Rendering Pipeline
Programmable stages are bold; fixed-function stages are the ones the hardware handles.
Vertex Specification
│
▼
Vertex Shader ← runs once per vertex
│
▼
Tessellation (optional) ← TCS → Tessellator → TES
│
▼
Geometry Shader (optional) ← emits new primitives
│
▼
Vertex Post-Processing ← clipping, perspective divide, viewport
│
▼
Primitive Assembly ← points, lines, triangles
│
▼
Rasterization ← primitives → fragments
│
▼
Fragment Shader ← runs once per pixel
│
▼
Per-Sample Operations ← depth, stencil, blending
│
▼
Framebuffer
OpenGL, WebGL, and Vulkan all implement this pipeline. They disagree about who configures it: OpenGL lets you change state at any time and figures it out; Vulkan asks you to bake the entire pipeline configuration into a Pipeline State Object once, at creation, and makes subsequent draw calls cheap. Full stage-by-stage reference in M5 — Pipeline & Patterns.
Which API Should I Reach For?
| Situation | Reach for | Why |
|---|---|---|
| CAD or scientific visualization on the desktop | OpenGL 4.6 | Mature, stable, driver handles complexity. Legacy ecosystem already in place. |
| Cross-platform AAA game engine, every-ms-counts workloads | Vulkan 1.4 | Explicit control, multi-threaded command generation, lower CPU overhead, predictable frame pacing. |
| Browser visualization, web-based creative coding | WebGL 2 today, WebGPU going forward | WebGL 2 is universally supported post-Feb-2022. WebGPU is the modern explicit successor now rolling out. |
| Mobile / embedded systems | OpenGL ES 3.2 or Vulkan 1.3 | ES 3.2 for broad compatibility; Vulkan where the device supports it and CPU/power efficiency matters. |
| Safety-critical (automotive, avionics, medical) | OpenGL SC 2.0 or Vulkan SC | Certifiable subsets designed for DO-178C / ISO 26262 contexts. |
| Writing your first shader | p5.js or Shadertoy (GLSL fragment shaders) | Zero setup, instant feedback loop. See CSP Pathway 6: Creative Coding. |
Verification
Every factual claim checked against primary specifications at the Khronos registry, W3C, MDN, and independent technical references. Results as of April 20, 2026.
The remaining partial is EC-04 — temporal currency of the quantitative Vulkan benchmarks.
The strongest available Khronos-citable numbers remain ARM's October 2016 Mali measurement and Futuremark's 2017 API-overhead test.
Full pass/fail with evidence pointers in the Verification Matrix.
Cross-Domain Connections
Graphics APIs connect to every other research cluster on this site. The same parallel-compute patterns appear everywhere the GPU shows up.
GFX ↔ CSP Creative Coding
Pathway 6 of Computer Science & Programming walks through shaders with concrete GLSL fragment shader code. Section 4 covers the four-API stack with cross-links back here, and the “Try This” list includes building the same shader across WebGL, WebGPU (WGSL), and Vulkan (GLSL→SPIR-V).
GFX ↔ CSP Languages
Programming Languages — A Living History places GLSL, HLSL, and the graphics API stack on the broader language-timeline map. Era 5 now carries an expanded GLSL card plus a sibling “Graphics API Stack” card covering OpenGL/WebGL/Vulkan/SPIR-V with dates and governance.
GFX ↔ Math Co-Processor
The same RTX 4060 Ti that runs our shaders also runs CUDA kernels for FFT, SVD, Monte Carlo, and matrix operations via MPC. Same silicon, different shading language (CUDA vs GLSL), same massively parallel execution model. GLSL compute shaders and CUDA share lineage — the GPU thinks in parallel regardless of who asks.
GFX ↔ CERN (ALICE GPU Reconstruction)
ALICE's Run 3 upgrade moved track reconstruction onto GPUs at 50 kHz — 500,000 tracks per second. Same parallel compute model as graphics rasterization, applied to particle physics. Every draw-call issued by Vulkan and every track reconstruction issued by ALICE travel the same hardware.
GFX ↔ Forest Simulation
A live in-browser example of the WebGL rendering pipeline: L-system trees, Boid birds, Kuramoto fireflies, Physarum slime mold. 1,297 lines of p5.js, weather-driven, astronomically accurate. View source: the entire graphics stack below renders it in real time.
GFX ↔ OPEN Problems
The open questions at the graphics frontier overlap with our OPEN-problem tracker: explicit-API scheduling (same class of problem as multi-agent coordination), WebGPU/WGSL adoption strategies, ray-tracing cost models, and the continuing absence of a unifying shader IR across vendors.
Downloads & Companion Files
GFX.pdf
Full canonical reference. XeLaTeX + DejaVu Serif. 237 KB.
FINAL.md
Single-file source: all five modules + bibliography + verification matrix. 14,664 words.
Bibliography
Three-part split: standards bodies, professional organizations, encyclopedia references.
Verification Matrix
Per-criterion and per-test pass/fail with evidence pointers into the module files.
sources.yml
Pre-vetted source index grouped by Khronos, ecosystem, MDN, tooling, encyclopedia.
schema.md
Module template and cross-module terminology rules used during writing.
How to Recompile
The PDF is built with pandoc + XeLaTeX using DejaVu Serif / DejaVu Sans. Preamble ships alongside the markdown sources:
pandoc FINAL.md -o GFX.pdf --pdf-engine=xelatex \ --toc --toc-depth=3 -H header.tex \ -V papersize=letter -V fontsize=11pt \ --metadata title="Graphics Programming APIs"
On Ubuntu/Debian: sudo apt install texlive-xetex texlive-fonts-extra texlive-latex-extra fonts-dejavu.