What object's state does glEnableVertexAttribArray modify?

后端 未结 1 501
慢半拍i
慢半拍i 2021-01-25 07:03

I think I understand what glEnableVertexAttribArray does -- it activates a particular attribute of a program (please correct me if I am wrong).

What I don\'t understand

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-25 07:31

    It affects vertex array object state.

    If so, what about in OpenGL ES 2.0, where there are no VAOs?

    Then it affect global context state. The set of state that would become VAO state was originally just global state. That's why the OpenGL bind-to-modify object model exists; so that when you add new objects, you don't have to change your old code.

    0 讨论(0)
提交回复
热议问题