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?
- For each object, call gl*Pointer to set the pointer to the object’s vertex array data
- 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.