VBO performance Issue

Started by
3 comments, last by parmar 15 years, 3 months ago
Hi List, I have implemented VBO for our project,but it not getting any fps gain.Please help me on this issue. Regards, Parmar.
Advertisement
Could you elaborate a bit on your previous and current solution?

Just saying you now use VBOs without telling us what you used before, how you utilize the VBOs etc. doesn't help much.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
Thanks for reply.
Earlier i was drawing the model using glDrawElements without using
VBO.
Code Without VBO.

glVertexAttribPointer ( positionLoc, 3, GL_FLOAT,
GL_FALSE, 3 * sizeof(GLfloat),data);

glEnableVertexAttribArray (positionLoc );



glUniformMatrix4fv(mvpLoc, 1, GL_FALSE, (GLfloat*) &mvpMatrix.m[0][0] );


glDrawElements ( GL_TRIANGLES,numIndices, GL_UNSIGNED_INT, indices);

Now i am drawing the same model using VBO but i am not getting any performance
gain.

Code With VBO.

glBindBuffer( GL_ARRAY_BUFFER, id );
glVertexAttribPointer ( positionLoc, 3, GL_FLOAT,
GL_FALSE, 3 * sizeof(GLfloat),NULL);

glEnableVertexAttribArray (positionLoc );


// Load the MVP matrix
glUniformMatrix4fv(mvpLoc, 1, GL_FALSE, (GLfloat*)mvpMatrix.m[0][0] );


glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, id1 );
// Draw the cube
glDrawElements ( GL_TRIANGLES,numIndices, GL_UNSIGNED_INT, NULL/*indices*/ );

App is working fine,but not getting any performance gain.I am generating the VBO id once and deleting at the time of exit.
So you did use VertexArrays before?

Basically, they are the same as VBOs except for the memory they reside in. VAs reside in RAM and are transferred to the GPU when needed, VBOs reside in VRAM (so no need for transferring each time they are use, except when being updated).

The performance gain depends on the size of data stored in each array. For small arrays/VBOs the gain should almost be unnoticable, for larger blocks of data (1000+ vertices?) there might be a noticable gain.

But maybe you're not bandwidth limited. The bottleneck might lie elsewhere (fill rate, transform rate, etc.)
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
Thanks Lord_Evil for your help.
My model data is more than 1000 vertices.
I think my bus is not busy,killing the performance in setting the uniform in shader.I am trying to find out the reason for not getting performance.

This topic is closed to new replies.

Advertisement