taiit / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

redundant code in vertex-buffer.cpp #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
void
vertex_buffer_upload ( vertex_buffer_t *self ){
...
    if( !self->vertices_id )
    {
        glGenBuffers( 1, &self->vertices_id );
        /*delete line*/glBindBuffer( GL_ARRAY_BUFFER, self->vertices_id );
    }
    if( !self->indices_id )
    {
        glGenBuffers( 1, &self->indices_id );
       /*delete line*/glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, self->indices_id );
    }
...
// Upload vertices
    glBindBuffer( GL_ARRAY_BUFFER, self->vertices_id );
...
// Upload indices
    glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, self->indices_id );
}

Original issue reported on code.google.com by bso...@gmail.com on 18 Jul 2012 at 9:40

GoogleCodeExporter commented 8 years ago
Thanks, fixed.

Original comment by Nicolas.Rougier@gmail.com on 19 Jul 2012 at 8:43