Mesh::Mesh(const vector<vec3>& vertices, const vector<GLuint>& indices){ attributes.clear(); this->modelMatrix = mat4x4(); glGenVertexArrays(1, &vao); glBindVertexArray(vao); Attribute vertexAttrib; addVBO(vertices, vertexAttrib); addIndices(indices); glBindVertexArray(0); }
void DrawSmooth::onObjectAdd() { addVBO( scene()->objects().size() - 1 ); }
void DrawVBO::onPluginLoad() { for(unsigned int i=0; i<scene()->objects().size(); i++) addVBO(i); }