12-08-2003, 02:20 AM

What should I do if I want to have matrix transformations not only affect vertices as they are drawn, but actually want to store their location in literal modelview space (thus, with the matrix transformation) in an array or something?

Like in skeletal animation. I will have an individual mesh attached to each bone, which will be stored in the communal vertex array. In skeletal animation, each bone has a transformation matrix; when you apply these to each mesh, in order, with pushes and pops when you go backwards, and draw each as you go (with glDrawRangeElements), it will output everything correctly in the model. However, the rest of your program will have no information about where in real space everything in your model is, since you used transformation matrices and don't have real vertices representing where the vertices in your meshes currently are relative to everthing else.

So how do you save a copy of the vertices having been transformed by the matrix?

Like in skeletal animation. I will have an individual mesh attached to each bone, which will be stored in the communal vertex array. In skeletal animation, each bone has a transformation matrix; when you apply these to each mesh, in order, with pushes and pops when you go backwards, and draw each as you go (with glDrawRangeElements), it will output everything correctly in the model. However, the rest of your program will have no information about where in real space everything in your model is, since you used transformation matrices and don't have real vertices representing where the vertices in your meshes currently are relative to everthing else.

So how do you save a copy of the vertices having been transformed by the matrix?