VBOs, performance and shared vertices

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?

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.

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. I’ll give that a try.

Excellent - that was great. Massive speed improvement.