See graphics/MesaLib.