glEnableClientState

Is it best to enable vertex arrays with the glEnableClientState(GL_VERTEX_ARRAY) once then just use glVertexPointer to change the array currently in use or should you disable then re enable the client state each time you change vertex arrays.

Thanks

Julian

Hi !

I think that’s difficult to say because it may depend on the hardware, one solution might be quick on one videocard and the other on another videocard.

Most of the time you can find the best solution by using the one that generates least amount of OpenGL function calls, because this is the bottleneck in most OpenGL implementations (sending data to the videocard).

Mikael

Rather than function calls, it’s best to minimize state changes.
You should definitely enable the VA once and just change the pointers when switching from a model to another.

You dont have to turn off/opn anything, but make your changes to your array (s) after rendering is complete or before starting to render, otherwise the behavior will be undefined.

V-man

regular VA interface is synchronous. there is no way you can change an array’s content while it is processed.