Does anyone have any experience of using OSMesa and OpenGL together?

I'm not sure how to go about it: in order to make the header files use the mgl* namespace i have to


which trips a whole load of #defines in the header files like:

#define glVertex2f mglVertex2f

etc etc.

Trouble is if I wanted to call the gl* functions for OpenGL, they will automatically be #defined to mgl*.

Anyone know how to get round this?