The Best Approach to Vertex Arrays?

Greetings,

I’m revising some code of mine and asked myself a question which I could not answer:

Which approach would be better (cleaner/faster…) when using vertex arrays?

  1. For each object, call gl*Pointer to set the pointer to the object’s vertex array data

or

  1. Call the glPointer functions once during setup, essentially assigning a region in memory where all vertex array data goes before processing. Each object now copies its data to the pre-assigned buffer instead of calling the glPointer functions.

Any facts, opinions, or snorts of laughter would be appreciated.

Thanks,
– Jeff

If you allocate your initial chunk as AGP
memory using the nVidia vertex array range
extension, and copy/write there using
contiguous writes (to use the write combiners)
then the second method may be faster.

Else the first one should be faster or about
the same, although profiling never hurt
anyone :slight_smile: