I have a single mesh, and I give the vertex-shader a matrix which holds the objects position, scale and rotation. It seems to work.
in vec3 position;
uniform mat4 object;
uniform mat4 view;
uniform mat4 proj;
void main() {
gl_Position = proj * view * object * vec4(position, 1.0);
}
What if I have multiple meshes? What is the standard way to approach this? Feed in a different mat4
for every mesh rendered, or have separate vertex shaders for each mesh?