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. Which OpenGL feature allows the geometry shader to generate additional primitives? Geometry shaders can emit vertices and use EmitVertex()/EndPrimitive()
  6. In OpenGL 4.6, what functionality was added from SPIR-V support? Ability to load precompiled SPIR-V shader binaries directly
  7. 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
  8. Which per-fragment operation runs after blending and writes or discards the final color to the framebuffer? Color masking (glColorMask)
  9. 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
  10. What does glBindVertexArray(0) accomplish? Unbinds the current VAO, restoring the default state
  11. What does the OpenGL function glScissor() do? Defines a rectangular region outside which all rendering is discarded
  12. Which OpenGL mechanism allows the CPU to read back rendered pixels from the framebuffer? glReadPixels()
  13. What is the purpose of glGenerateMipmap()? Automatically generates all mipmap levels for a texture
  14. In OpenGL, what is the correct order of matrix multiplication to transform a vertex from object space to clip space? clip = Projection × View × Model × vertex
  15. Which GLSL qualifier marks a fragment shader output variable that writes to a color attachment? out
  16. 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
  17. What does glStencilOp() control? How the stencil buffer is updated based on test results
  18. Which spotlight parameter in OpenGL's fixed-function lighting defines the half-angle of the light cone in degrees? GL_SPOT_CUTOFF
  19. What is the purpose of a Transform Feedback object in OpenGL? Capturing vertex shader output into buffer objects for later use
  20. Which OpenGL function specifies how vertex attribute data is read from a VBO? glVertexAttribPointer()
  21. What is glMaterialf(...) used for? Defines the material properties of a drawn object for visual effects
  22. What does the ARB suffix in an OpenGL extension name indicate? The extension has been reviewed and approved by the OpenGL Architecture Review Board
  23. Which OpenGL function enables a specific rendering capability such as depth testing? glEnable
  24. What rotation representation avoids gimbal lock and is commonly used in 3D graphics for smooth interpolation? Quaternions
  25. Which GLSL version directive is required to use the core profile layout qualifiers? #version 330 core
  26. Which function do you call to attach a renderbuffer to a framebuffer object? glFramebufferRenderbuffer()
  27. Which OpenGL fixed-function call correctly sets the position of a light source? glLightfv(GL_LIGHT0, GL_POSITION, pos)
  28. What does the GL_ELEMENT_ARRAY_BUFFER target store? Index data for indexed drawing commands
  29. Which matrix transforms vertices from world space into camera (eye) space? View matrix
  30. What does glDepthMask(GL_FALSE) do in OpenGL? Prevents writes to the depth buffer while still allowing depth testing
Was this helpful?