Within a research project, I am coding a physics engine for deformable bodies and visualization is made through OpenGL.
During the simulation, it may happen that vertexes of a given mesh are influenced by one or more rigid transformations (i.e., translations and rotations). For the simulation computation, I need the coordinates of vertexes in the world frame, so I explicitly set a transformation matrix and apply it to the vertex coordinates.
I wonder if OpenGL can do part of the work: I would like to set the transformation matrix with glLoadMatrix, send a vertex array on the gpu, transform and fetch back the results in the system memory.
I know that retrieving data from the gpu can be quite slow, however I would like to try because the number of the vertexes can be high and doing the computation entirely on the cpu may slow down the whole simulation.
Perhaps such a task could be performed directly in the fixed pipeline, without the need of any shader, but I am not sure of this. I would be very grateful if someone could share some hints (in case using shaders too).