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
- What does the OpenGL compute shader stage provide that other shader stages do not? → General-purpose GPU computation outside the fixed graphics pipeline
- What does enabling GL_COLOR_MATERIAL allow in OpenGL? → Tracking the current glColor value to automatically set material properties
- Which OpenGL primitive type draws a separate triangle for every 3 vertices submitted? → GL_TRIANGLES
- What does the Direct State Access (DSA) API eliminate in OpenGL? → The requirement to bind an object before modifying its state
- Which OpenGL feature allows the geometry shader to generate additional primitives? → Geometry shaders can emit vertices and use EmitVertex()/EndPrimitive()
- In OpenGL 4.6, what functionality was added from SPIR-V support? → Ability to load precompiled SPIR-V shader binaries directly
- 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
- Which per-fragment operation runs after blending and writes or discards the final color to the framebuffer? → Color masking (glColorMask)
- 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
- What does glBindVertexArray(0) accomplish? → Unbinds the current VAO, restoring the default state
- What does the OpenGL function glScissor() do? → Defines a rectangular region outside which all rendering is discarded
- Which OpenGL mechanism allows the CPU to read back rendered pixels from the framebuffer? → glReadPixels()
- What is the purpose of glGenerateMipmap()? → Automatically generates all mipmap levels for a texture
- 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
- Which GLSL qualifier marks a fragment shader output variable that writes to a color attachment? → out
- 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
- What does glStencilOp() control? → How the stencil buffer is updated based on test results
- Which spotlight parameter in OpenGL's fixed-function lighting defines the half-angle of the light cone in degrees? → GL_SPOT_CUTOFF
- What is the purpose of a Transform Feedback object in OpenGL? → Capturing vertex shader output into buffer objects for later use
- Which OpenGL function specifies how vertex attribute data is read from a VBO? → glVertexAttribPointer()
- What is glMaterialf(...) used for? → Defines the material properties of a drawn object for visual effects
- What does the ARB suffix in an OpenGL extension name indicate? → The extension has been reviewed and approved by the OpenGL Architecture Review Board
- Which OpenGL function enables a specific rendering capability such as depth testing? → glEnable
- What rotation representation avoids gimbal lock and is commonly used in 3D graphics for smooth interpolation? → Quaternions
- Which GLSL version directive is required to use the core profile layout qualifiers? → #version 330 core
- Which function do you call to attach a renderbuffer to a framebuffer object? → glFramebufferRenderbuffer()
- Which OpenGL fixed-function call correctly sets the position of a light source? → glLightfv(GL_LIGHT0, GL_POSITION, pos)
- What does the GL_ELEMENT_ARRAY_BUFFER target store? → Index data for indexed drawing commands
- Which matrix transforms vertices from world space into camera (eye) space? → View matrix
- What does glDepthMask(GL_FALSE) do in OpenGL? → Prevents writes to the depth buffer while still allowing depth testing
Turn these facts into recall:
Was this helpful?