OpenGL Cheat Sheet 2026

The 30 highest-yield OpenGL facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

50 questions
60 min time limit
70% to pass
  1. What does the OpenGL compute shader stage provide that other shader stages do not? General-purpose GPU computation outside the fixed graphics pipeline
  2. What does enabling GL_COLOR_MATERIAL allow in OpenGL? Tracking the current glColor value to automatically set material properties
  3. Which OpenGL primitive type draws a separate triangle for every 3 vertices submitted? GL_TRIANGLES
  4. What does the Direct State Access (DSA) API eliminate in OpenGL? The requirement to bind an object before modifying its state
  5. In OpenGL 4.6, what functionality was added from SPIR-V support? Ability to load precompiled SPIR-V shader binaries directly
  6. What is a renderbuffer object (RBO) typically used for compared to a texture attachment in an FBO? RBOs are optimized for off-screen render targets that will not be sampled as textures
  7. Which per-fragment operation runs after blending and writes or discards the final color to the framebuffer? Color masking (glColorMask)
  8. What is the purpose of GL_LIGHT_MODEL_AMBIENT in OpenGL's fixed-function lighting? Defines a global ambient light that illuminates the entire scene uniformly
  9. Which GLSL qualifier marks a fragment shader output variable that writes to a color attachment? out
  10. Which function specifies how a texture should be sampled when the texture is smaller than the screen area it covers (magnification)? glTexParameteri with GL_TEXTURE_MAG_FILTER
  11. Which spotlight parameter in OpenGL's fixed-function lighting defines the half-angle of the light cone in degrees? GL_SPOT_CUTOFF
  12. What is glMaterialf(...) used for? Defines the material properties of a drawn object for visual effects
  13. What does the ARB suffix in an OpenGL extension name indicate? The extension has been reviewed and approved by the OpenGL Architecture Review Board
  14. Which OpenGL function enables a specific rendering capability such as depth testing? glEnable
  15. What rotation representation avoids gimbal lock and is commonly used in 3D graphics for smooth interpolation? Quaternions
  16. Which GLSL version directive is required to use the core profile layout qualifiers? #version 330 core
  17. Which OpenGL fixed-function call correctly sets the position of a light source? glLightfv(GL_LIGHT0, GL_POSITION, pos)
  18. What does the GL_ELEMENT_ARRAY_BUFFER target store? Index data for indexed drawing commands
  19. Which matrix transforms vertices from world space into camera (eye) space? View matrix
  20. What does glDepthMask(GL_FALSE) do in OpenGL? Prevents writes to the depth buffer while still allowing depth testing
  21. Which OpenGL function links compiled shader objects into a program object? glLinkProgram
  22. What is the difference between an OpenGL core profile and a compatibility profile context? Core profile removes deprecated features; compatibility profile retains them
  23. Which GLSL type represents a 4×4 floating-point matrix? mat4
  24. What is the correct order of the main stages in the OpenGL rendering pipeline? Vertex shader → Rasterization → Fragment shader → Output merger
  25. What is the purpose of the OpenGL Extension Wrangler Library (GLEW)? Loads and exposes OpenGL extension function pointers at runtime
  26. Which of the following describes computer graphics features? Creation and manipulation of graphics by computer
  27. What does the glViewport function define in OpenGL? The rectangular window area on screen that NDC maps to
  28. Which OpenGL command draws primitives using indices stored in the element array buffer? glDrawElements
  29. What is the maximum number of texture units available to a fragment shader on most modern OpenGL hardware? At least 16, typically 32+
  30. What OpenGL function swaps the front and back buffers to display the completed frame? SwapBuffers (platform API)
Turn these facts into recall: