mesh deformed on GPU but accesible on CPU

Currently I have a bone system that does its deformation on the GPU, but at certain points I would like to export that mesh to a file in its deformed state.

Although it would be easy re-implement and just always do that code on the CPU, I would really like to keep it in the GPU.

Is it possible to do this?

I can imagine writing out the mesh to a texture in ortho camera space and then make that texture available on the cpu, but there would always be the problem of when verts line up directly on top of each other.

Thoughts, comments?


Take a look at transform feedback, it allows you to write the output of vertex processing to a buffer object (which you can then copy back to main memory, when you need CPU access).