Consider a 3D model for a spider that consists of a body and eight legs. The legs can be transformed (rotated) relative to the body. I am not sure what the common ways of rendering such a scene are, at a low level. Two ways I could think of:
- Render the body and legs separately, using different VBOs (or different indices) (one for the body, one for the leg) and separate draw calls.
- Encode in each vertex which body part it belongs to, and decide based on this information how to transform the vertex in the vertex shader.
I searched a bit and could find some tutorials on skeletal animation and similar techniques, but they still boil down to this question.