Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(std::vector<Face>::iterator it = faces.begin();it != faces.end();++it) {
- const Face &f = *it;
- std::Vector<GLint> indices;
- std::Vector<GLfloat> positions;
- for(int i=0;i<f.vcount;++i){
- const Vertex &v = m_vert[f.verts[i]];
- positions.push_back(v.x);
- positions.push_back(v.y);
- positions.push_back(v.z);
- indices.push_back(f.verts[i]);
- }
- glVertexPointer(3,GL_INT,3,&positions[0]);
- glDrawElements(GL_POLYGON,indices.size(),GL_UNSIGNED_INT,&indices[0]);
- positions.clear();
- indices.clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement