What exactly does glEnableVertexAttribArray do?

Viewed 42499

I was reading: Dissecting Display, Chapter 1. Hello, Triangle!.

What exactly does glEnableVertexAttribArray do? I think it enables the use of a given VBO, but I am not sure.

I thought that is what glEnableClientState(GL_VERTEX_ARRAY) did.

3 Answers

There is another way to specify data for a vertex attribute, the non-array way:

khronos: glVertexAttrib

In this way, we specify data for only one vertex, this data will be replicated for all vertices.

To use non-array data, call glDisableVertexAttribArray.

To use array data, call glEnableVertexAttribArray.

Related