View Full Version : State changes, vertex arrays, and performance

03-17-2001, 04:15 PM
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 gl*Pointer to swap arrays, you just copy over the old data. The pointers never change; therefore the call to gl*Pointer 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?

03-17-2001, 04:18 PM
No, pointer changes are not anywhere near that expensive.

- Matt