   glReadPixels without glut or a window open
  I am simulating a mechanical system by integrating the equations of motion and then using glut to animate the results as a means of visualizing the animation.  I use GLUT to draw the animation to a window, and glReadPixels to grab the pixel data and then write it to .png files, which I then use for making animations to be put on my website or on Youtube, etc.  Here is an example of one of these animations:I would like to know how to render the scene and grab the pixel data without actually opening a window, and perhaps without using glut.  I want to put my code on a server so that it can be run through some cgi scripts that let people enter simulation parameters through a simple web based form, which then runs the simulation on the server, saves all the .pngs, and then zips them up and sends it back to the user so they can encode their own movie on their own machine, in whatever format they like.To summarize:How would I modify my GLUT dependent code to render the scene but not display it in a window?  Once this is done, can I still use glReadPixels to grab the pixel data so I can write the .png files of each frame?Thanks,~Luke   
  For this, Mesa's off screen renderer is almost the perfect solution. With typical OpenGL implementations, you need a window in order to create the rendering context. Even though you can create a hidden window and then make some offscreen renderer, you're still required to have the hidden window, and thus depending on a window manager on your server.With OSMesa, you just allocate the frame buffer and Mesa will draw directly into it. There's no need for a window manager on the server, and no need to use glDrawPixels because the image is rendered directly into your own memory buffer.