OpenGL Cheat Sheet

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

A single-page index of quick links to every page in this sub-section, grouped the same way as the sub-section itself, for jumping straight to the topic you need instead of paging through the navigation.

Download the OpenGL Cheat Sheet (PDF)

The downloadable PDF is a separate, single A4 page meant for printing. It states the version baseline this sub-section targets (OpenGL 4.6 with GLSL 4.60, OpenGL ES 3.2 with GLSL ES 3.20 and EGL 1.5, all checked on 1 November 2026) and covers:

  • the API family and versions, with the macOS 4.1 cap, the Android API levels, the WebGL mapping, ANGLE and Zink;

  • a context setup snippet with GLFW hints, the glad load and the debug callback;

  • the object lifecycle table for buffers, vertex arrays, textures, samplers, framebuffers and programs;

  • a mini pipeline diagram and a minimal vertex and fragment shader pair with the GL and ES headers;

  • vertex attribute setup with a stride and offset sketch;

  • the model, view and projection chain with GLM calls and the NDC and depth conventions;

  • a texture parameter table and the state toggles for depth, culling, blending and stencil;

  • the draw call family, the std140 and std430 rules and a debugging checklist;

  • the porting map from OpenGL to Vulkan, Metal and WebGPU and a strip of what changed since older tutorials.