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
- 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
- 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
- Which spotlight parameter in OpenGL's fixed-function lighting defines the half-angle of the light cone in degrees? → GL_SPOT_CUTOFF
- 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 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
- Which OpenGL function links compiled shader objects into a program object? → glLinkProgram
- What is the difference between an OpenGL core profile and a compatibility profile context? → Core profile removes deprecated features; compatibility profile retains them
- Which GLSL type represents a 4×4 floating-point matrix? → mat4
- What is the correct order of the main stages in the OpenGL rendering pipeline? → Vertex shader → Rasterization → Fragment shader → Output merger
- What is the purpose of the OpenGL Extension Wrangler Library (GLEW)? → Loads and exposes OpenGL extension function pointers at runtime
- Which of the following describes computer graphics features? → Creation and manipulation of graphics by computer
- What does the glViewport function define in OpenGL? → The rectangular window area on screen that NDC maps to
- Which OpenGL command draws primitives using indices stored in the element array buffer? → glDrawElements
- What is the maximum number of texture units available to a fragment shader on most modern OpenGL hardware? → At least 16, typically 32+
- What OpenGL function swaps the front and back buffers to display the completed frame? → SwapBuffers (platform API)
Turn these facts into recall: