[ODE] Saving the contents of the simulation window.

Kevin Frugier Kevin.Frugier at insa-lyon.fr
Mon Jun 28 22:53:19 MST 2004


> Does anyone know of any OpenGL/GLUT function to save the contents of the
> simulation window to an image file.

Use glReadPixels function, for example

unsigned char mypicture[3*width*height];
glReadPixels(0,0,width,height,GL_RGB,GL_UNSIGNED_BYTE,mypicture);

Then you can write mypicture directly in a RAW file (raw is just data, no
header) and convert it in what you want with a picture-soft.
This is the easiest way i think.


More information about the ODE mailing list