The OP most likely already understands the first part, but let me just repeat some points of the vertex attributes to establish the basis for the more interesting part. I assume that all vertex data comes from buffers, rather than talking about where type calls are used to call "constant" values for attributes glVertexAttrib3f().
- The calls
glEnableVertexAttribArray()both glVertexAttribPointer()determine which vertex attributes are included, and describe how the GPU should retrieve their values. This includes their location in memory, the number of components, their type, pitch, etc. In the remainder of this answer, I will call the collected state indicated by these calls the "vertex attribute state". - . (VAO) . , . VAO , , .
attribute/in , in. , in. .
, , in . , . , , , glEnableVertexAttribArray() VAO, .
, , : , ?
, . , , . . , , .
? , . :
A, . .
B . , / . , , , . , / , , . .
, , . , . , , , , . , , , , .
, , . , , . . , , . , VAO, glBindVertexArray(), / API.