Waffle is a cross-platform C library that allows one to defer selection of GL API and window system until runtime. For example, on Linux, Waffle enables an application to select X11/EGL with an OpenGL 3.3 core profile, Wayland with OpenGL ES2, and other window system / API combinations.
Waffle's immediate goal is to enable Piglit, Mesa's OpenGL test suite, to test multiple GL flavors in a cross-platform way. However, Waffle's design does not preclude it from being useful to other projects.
At the 2012 X Developer's Conference in Nürnberg, Chad Versace gave a 30 minute presentation on Waffle, which includes a demo of Doom3. Demo begins at 9:15. Q&A session begins at 15:30.
To read the presentation's text, the video needs to be fullscreen.