| 4 | #include <stdexcept> |
| 5 | |
| 6 | Model::Model(const std::vector<GLfloat>& vertexPositions, |
| 7 | const std::vector<GLfloat>& textureCoordinates, |
| 8 | const std::vector<GLuint>& indices) |
| 9 | : m_indicesCount (indices.size()) |
| 10 | { |
| 11 | glGenVertexArrays(1, &m_vao); |
| 12 | bind(); |
| 13 | |
| 14 | addVBO(3, vertexPositions); |
| 15 | addVBO(2, textureCoordinates); |
| 16 | addEBO(indices); |
| 17 | } |
| 18 | |
| 19 | Model::Model(Model&& other) |
| 20 | : m_vao (other.m_vao) |