Q:

Is it better to use the deprecated glTranslatef or update coordinates using glBufferSubData?

I want to make my VBO move and I was wondering if I should update the entire VBO with updated values using glBufferSubData or just use the deprecated glTranslatef to move my thing.
And if I were to just update the values in the VBO, should I use a separate VBO for the vertices, normals, and texture coordinates or should I put them all in one?
Thanks.

A:

1: Usually you should always try to reduce the amount of data transferred between CPU and GPU to a minimum to keep the performance at the maximum.
So, updating the entire vertex buffer using glBufferSubData() should be avoided and as long as possible and transformations such as glTranslate() and glLoadMatrix() (which are deprecated) or shaders should be used.
But since you are already working with VBOs I would recommend to use shaders to do the transformation using a shader uniform variable and glUniformMatrix().
2: Separating the vertices, normals, and texture coordinates or combining them in one VBO is up to you. In most cases I combine them because it produces only one handle and I need only one glBufferData() call. But if there is a situation when only one part like the texture coordinates is updated and the rest stays as it is, then separating would be better as you could also update them separately.
Even more advanced:
If you are using buffer interlacing than you obviously have to combine them.
Sometimes using buffer interlacing can be faster than without because the data needed for a single vertex is kept together and the caches can be used. But you have to try out what impact that has on the performance (if any) as it strongly depends on the hardware you are using.

