-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Hi there, your tutorial is excellent, thank you for putting so much work into this. My question is about the Mesh class, I am unable to get it to render multiple meshes. As far as I can tell this is due to the m_vertexArrayObject allocating the same ID for the mesh. Also, i had to make some changes to make this make more sense. For example, I changed m_vertexArrayObject from a GLuint to an array of length one:
enum {
SINGLE_VAO,
NUM_VAO
};
GLuint m_vertexArrayObject[NUM_VAO];
glGenVertexArrays(NUM_VAO, m_vertexArrayObject);
glBindVertexArray(m_vertexArrayObject[SINGLE_VAO]);
Secondly, the second argument to glGenVertexArrays is no longer passed as a pointer. Again, this is based on examples I found elsewhere. The problem I am facing is that m_vertexArrayObject[SINGLE_VAO] is always zero (i assume to that being the default value of the array), so (as far as i know) this means I can never have more than one mesh.
Thanks for your help with this!