Twenty-one days. One renderer, Meridian. Every picture in the book drawn by the program itself.
Windows ships the OpenGL of 1992: opengl32.dll is version 1.1, with everything since living in the driver. Day 2 generates its own loader from the Khronos registry, the same file GLAD and GLEW are built from.
On Day 1 there is a context, a framebuffer and a triangle in a PNG, with no window, because a window is three hundred lines of Win32 that teach nothing about graphics. By Day 9 Meridian has a mesh library built on Direct State Access. By Day 14 a shadow falls correctly across a lamp-lit stone observatory. By Day 21 it is a 379-kilobyte program that runs with no compiler installed.
405 figures across 21 chapters, 210 of them frames Meridian rendered and wrote to disk -- no screen grab anywhere. All 147 listings compile as printed, and 83 output blocks were captured from a real run. The engine is snapshotted 21 times, once a day, each diffable against the one before.
YOUR 21-DAY PATH
Day 1 - A Context, and a Picture with No Window: a context and a triangle in a PNG, with no window anywhere.
Day 2 - The Loader, and What "Modern OpenGL" Means: a loader generated from the Khronos registry itself. Day 3 - A Window, and SwapBuffers: a Win32 window, a swap chain, and one blit into it. Day 4 - Buffers, Vertex Arrays, and the Triangle: Direct State Access, and geometry that lives on the card. Day 5 - Shaders, and the Shading Language: compiling and linking GLSL, uniforms, and a driver's error log. Day 6 - Matrices, and the Cube That Turns: model, view and projection, a cube that turns without a vertex moving. Day 7 - Depth, the Frame Loop, and the First Measurement: a depth buffer and the engine's first measured microseconds. Day 8 - Textures, Samplers, and Mip Maps: immutable storage, sampler objects, and every texel computed in code. Day 9 - Meshes, and Building the Meridian: a mesh library in one pair of buffers, and the observatory built from it. Day 10 - Normals, and the First Light: the normal matrix and the moon, the day flat shading disappears. Day 11 - The Lamps, and How Light Falls Off: two lamps on two pillars, and four falloff models. Day 12 - Materials, and the Uniform Buffer: uniform blocks, std140, binding points, and six materials that differ. Day 13 - The Camera You Drive: raw mouse input and a camera you fly, on a path that renders the book. Day 14 - The Dome Casts a Shadow: a depth texture from the light, a comparison sampler, and every way bias goes wrong. Day 15 - Brass, Glass, and a Physical Surface: tangents, normal and roughness maps, and a Cook-Torrance BRDF. Day 16 - Framebuffers, and a Frame That Is a List: named passes, a full-screen triangle, and a state cache. Day 17 - The Lamp Gets Hot: a float target, sRGB textures, a bright pass with six blurs, and ACES. Day 18 - Compute Shaders, and the Dust in the Beam: storage buffers, memory barriers, and dust in the moonbeam. Day 19 - Ten Thousand Stars in One Draw Call: instancing and frustum culling in a single draw call. Day 20 - The Meridian, in a File: a versioned scene file, names instead of indices, and a loader that skips. Day 21 - A Folder Somebody Else Can Run: a static C runtime, a version check, and a folder somebody else can run.WHO IT IS FOR. A C++ programmer who has not written graphics before, or one who learned OpenGL from a 2004 tutorial and wants to know why this looks different. You need pointers, structs and a compiler; Day 6 builds the linear algebra. You need Windows and a driver offering OpenGL 4.6, nothing else: no GLFW, no GLM, no GLAD, no image library, no downloaded assets.
434 pages, in colour.