State changes, vertex arrays, and performance

There was a discussion that touched on this topic earlier, but the question was never addressed directly.

I know that state changing (texture swapping, material changes, etc) should be minimized as much as possible. Therefore, to maximize performance, polygons should be rendered in order of their texture/material.

In theory, you can write vertex arrays such that, instead of calling glPointer to swap arrays, you just copy over the old data. The pointers never change; therefore the call to glPointer only happens as an initialization step. This minimizes changes to gl*Pointers, thus saving a potentially expensive call.

Here is the question: is the time it takes to copy over arrays like this worth the savings in gl*Pointer calls?

No, pointer changes are not anywhere near that expensive.

  • Matt