Considering OpenGL 2.1 VBOs and 1.20 GLSL shaders:
- When creating an entity like "Zombie", is it good to initialize just the VBO buffer with the data once and do N
glDrawArrays()calls per each N zombies? Is there a more efficient way? (With a single call we cannot pass different uniforms to the shader to calculate an offset, see point 3)
- When dealing with logical object (player, tree, cube etc), should I always use the same shader or should I customize (or be able to customize) the shaders per each object? Considering an entity class, should I create and define the shader at object initialization?
- When having a movable object such as a human, is there any more powerful way to deal with its coordinates than to initialize its VBO object at 0,0 and define an uniform offset to pass to the shader to calculate its real position?