As I tried Linux, I had to research all GLX stuff manually. But If you want to render to a file, the best solution would be using an FBO and reading the color buffer, as rendering to pixmaps (and bitmaps) is not accelerated. You may also use pbuffers if yo wish…
Edit: if you use only mesa, you can use it’s specific stuff. Just look on their web-site under user-specific topics
do you have any example for using pbuffers? i want to do some rendering, save the result to a file, but i don’t want to open any display as it is going to be a background process. can pbuffers be used for this purpose?
pbuffers are quite ugly and non portable. Go for FBO if you can.
Beware that in any case, to actually have OpenGL hardware acceleration, you need to have a working X server, and create a window, even if it is an invisible window.