名称
glBindVertexArray — 绑定一个顶点数组对象
C规范
void glBindVertexArray( GLuint array);
参数
array
指定要绑定的顶点数组的名称。
描述
glBindVertexArray将顶点数组对象与名称数组绑定。 array是先前从glGenVertexArrays调用返回的顶点数组对象的名称,或者为0以绑定默认的顶点数组对象绑定。
如果不存在名称为array的顶点数组对象,则在第一次绑定array时创建一个对象。 如果绑定成功,则不会更改顶点数组对象的状态,并且任何先前的顶点数组对象绑定都会中断。
错误
如果array不为零或先前从调用glGenVertexArrays返回的顶点数组对象的名称,则生成GL_INVALID_OPERATION。
API版本支持
函数名 | 2.0 | 3.0 |
---|---|---|
glBindVertexArray | - | ✔ |
另见
glGenVertexArrays, glDeleteVertexArrays glVertexAttribPointer glEnableVertexAttribArray
版权
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glBindVertexArray.xhtml
Copyright © 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.