示例#1
0
void GLVertexSource::setVertexBuffer(const GLBuffer& vertex_buffer)
{
    glBindVertexArray(_vao_id);
    glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer.id());
    glBindVertexArray(0);
}
示例#2
0
void GLVertexSource::setIndexBuffer(const GLBuffer& index_buffer)
{
    glBindVertexArray(_vao_id);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer.id());
    glBindVertexArray(0);
}