I'm writing "for fun" my own graphic engine for Android with OpenGL ES 2.0.
After managing a whole scene with multiple objects mesh, I'm trying to implement Shadow Volumes.
The logic is (simplified) : first, I create an object (with vertices, faces, edges and all data) from a binary file. After that, I create a Vertex Buffer and draw elements.
Until now, I used transformation (scale, translation, rotation) with OpenGL functions on the model matrix (glRotate, etc..).
But for using Shadow Volume, I must, every time an object or light is transformed, calculate which faces are in front of light and the silhouette. So I use a loop on my vertex array.
My question is : Where to do transformations ? Do I have to transform the vertex array on every change and reload it in the Vertex Buffer ?
According to this, it's a bad thing : Android opengl modify vertex array after draw call
So, what is the best practice ?
Sorry for my poor english and thank you in advance ;)