PDA

View Full Version : DYNAMIC_DRAW_ARB usage



Coluna
01-09-2004, 05:20 PM
Im doing this to update my data to VBO buffer (its only about 1000 verts ,12 bytes each)

glBindBufferARB( GL_ARRAY_BUFFER_ARB, vbo_fix_id ); //bind my vbo buffer
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, ind_pool_tris*12,pool_tris); //ind_pool_tris is the amount of VERtS, not tris. pool_tris is the data itself
glVertexPointer( 3, GL_FLOAT, 0, BUFFER_OFFSET(0));
glDrawArrays(GL_TRIANGLES, 0 ,ind_pool_tris);
glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );

but in my tests with only vertex array is faster than with dynamic draw....
Is it right (the code)?