Ok guys, I already made the camera and hero movement and I loaded one small map consisting of 100 cubes for my mmorpg. I made some ugly models using blender, and I made a function that reads the vertices from .obj file and stores everything in GLfloat array. The next very important thing I need to know is: What kinds of operations should I try to keep to a minimum in my game?
What I gathered from previous posts is:
1. Don't make separate VAO and VBOs for every object, because binding and redefining a thousand VBOs every frame takes time.
2. Don't make too much draw calls because that takes time, too.
3. Calculate projection*view*model matrix outside the vertex shader, so you don't calculate the same stuff over and over.
4. Use spheres for collision whenever you can, because it's the simplest possible bounding object.
If anything more comes to mind, write it here, please, even if it's not so beginner-friendly, because I can return to this post at some point in the future.
And one more thing: I have a question about that 1st principle I just mentioned. Now that I have 7 or 8 models, what I need is a good, logical, performance-wise way of storing them in memory and drawing them on screen. How should I know when is the right time to make another VAO or VBO. Basically I know that VAO is a list of attributes for a number of objects, and it consists of several VBOs, and one VBO can contain vertex coordinates or textures or normals or stuff like that. So, for example, if I have 7-8 models with their own vertex coordinates, should I keep all their vertex coordinates in only one VBO or should I do something else?