PDA

View Full Version : VBOs, performance and shared vertices



02-18-2004, 09:30 PM
I'm presently porting my code over to use vertex buffer objects, and I'm getting really poor performance out of these. With a scene consisting of just over 6300 polygons, I'm getting *really* low framerates. I'm using glArrayElement () to send the vertex indices. Surely I should be getting better framerates than about 25 or 30 fps with only 6300 polys on a GeForce4 MX?

Also, is there a way of sharing UVs, vertex data between multiple faces, without having to make multiple copies of them, for use with index arrays, etc?

zeckensack
02-19-2004, 12:33 AM
You're using ArrayElement? That would likely be the cause for the poor performance, methinks.

You should be using index arrays and glDrawElements, or preferably glDrawRangeElements (this is an extension though - get glDrawElements up and running first).

It doesn't matter that much if you put the index arrays in system memory or in an "element array object" (defined by VBO). Putting them in system memory is easier and safer, so do that first. It may even be faster if you need more than unsigned shorts.

02-19-2004, 01:25 AM
You should be using index arrays and glDrawElements, or preferably glDrawRangeElements (this is an extension though - get glDrawElements up and running first).


Excellent, thanks for the advice. http://www.opengl.org/discussion_boards/ubb/smile.gif I'll give that a try.

02-19-2004, 02:43 AM
Excellent - that was great. http://www.opengl.org/discussion_boards/ubb/smile.gif Massive speed improvement. http://www.opengl.org/discussion_boards/ubb/smile.gif