//Model Vertices cordinates glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer); glVertexAttribPointer(0, 0, GL_INT, GL_FALSE,0,0); //Model Texture cordinates glBindBuffer(GL_ARRAY_BUFFER, texcoordbuffer); glVertexAttribPointer(1, 0, GL_FLOAT, GL_FALSE,0,0);
Also... I see another issue.
glDrawElements( GL_QUADS, faces.size(), GL_UNSIGNED_INT, reinterpret_cast<GLvoid*>(&faces));
should be glDrawArrays.
Afterall, you have added your data to a VBO, so why are you now drawing the data from faces?
That is also why it is displaying incorrectly, because faces contains the data for vertexes and tex coords merged into one.
So yeah, have a look at:
(cant remember the exact code myself, but let me know if you have any issues)