Tombstone
kitchen · Cauldron runtime
Jul 2007 – Mar 2008 · age 25–26
What it was
The C++ engine underneath the 2007 to 2008 Cauldron: a platform layer, the core, an OpenGL driver, a stalled Direct3D 9 driver, and the data model generated from a schema. Its heart was a render queue that was just a sort. Every draw request was a plain struct, sorted once per frame by shader, texture and mesh, and handed out as contiguous runs so GPU state changed once per level, with a stats line counting the binds that actually happened. The OpenGL driver was a family of "painters" over hardware buffers, with Phong and GLSL shaders, render-to-texture, picking and a z-sorted GUI shader. Scene data loaded either from a hand-rolled XML format or from a flat memory image. Static meshes, the GUI and picking all worked. Skeletal animation was the last day's work, and its hardware path was stubbed.
Wins, for the age
- At twenty-five, Jeff built a sort-keyed render queue and measured its binds instead of assuming them. Quake III had sorted its draw surfaces this way in 1999; this primate found the same answer alone, simply by wanting to count.
- Made the file the object graph: a
memcpy, a vtable borrowed from a static instance, and a pass of pointer arithmetic. Zero-copy loading, six years before Cap'n Proto made it famous in 2013. - Packed an instance count into the draw type, so a hundred crates were one queue entry, and gave shaders, textures and closures one tagged id space.
- Registered render targets as named textures, so a mirror surface was addressed like any texture from disk.
What it taught
- Batching is a data structure, and state changes are something to measure, not reason about.
- Generated serializers and an equality operator for every class beat the hand-written readers of earlier years.
- Driver abstraction has a price. The Direct3D driver proved the interface split was real, and its 700 frozen lines proved one person could not afford two drivers.
- Never leave a feature flag hard-coded off. One unconditional line kept the dwarf in bind pose, and a thread pool built before any work existed sat with every call commented out.
Genealogy
Ancestors: Cauldron v2 Engine: the generated scene model loaded as memory, and GLSL skinning. Inferno: the XML and flat-image runtime with its vtable-restoring loader. Descendants: none on record. The runtime ended with the engine it carried. Part of: Kitchen.
Epitaph
Here lies the Cauldron runtime. It sorted every frame, bound each texture once and counted it, and drew crates beautifully and a dwarf only standing still.