示例#1
0
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);
    
}
示例#2
0
void DrawSmooth::onObjectAdd()
{
    addVBO( scene()->objects().size() - 1 );
}
示例#3
0
void DrawVBO::onPluginLoad()
{
    for(unsigned int i=0; i<scene()->objects().size(); i++)
        addVBO(i);
}