PDA

View Full Version : glEnableVertexAttribArrayARB: global or per program?



cignox1
05-26-2006, 10:36 AM
Hi all! I'm trying to build a small class to wrap vertex and fragment objects, but I have a question for you: are the following functions:
glEnableVertexAttribArrayARB
glDisableVertexAttribArrayARB
glVertexAttribPointerARB
globally defined or only respect to the currently active program?
That is, if I enable a vertex attrib array and then I bind another shader, is the vertex array still enabled or do I have to enable it again for the new shader?

Corrail
05-26-2006, 08:03 PM
These functions effect global states and not states of the current bound vertex shader or vertex program.

Serge K
05-26-2006, 08:04 PM
Globally.
http://developer.3dlabs.com/documents/GLmanpages/glEnableVertexAttribArray.htm

cignox1
05-27-2006, 01:35 AM
Thank you!