PDA

View Full Version : glEnableClientState



Julian
05-14-2002, 04:12 PM
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

mikael_aronsson
05-14-2002, 09:57 PM
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

kehziah
05-16-2002, 03:17 AM
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.

V-man
05-17-2002, 05:13 AM
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

kehziah
05-17-2002, 06:01 AM
regular VA interface is synchronous. there is no way you can change an array's content while it is processed.