See gallium docs for writing new GL drivers