opengl - 如何使用直接状态访问将 'bind' 元素缓冲区数组转换为顶点数组对象?

标签 opengl vertex-buffer

对于其他缓冲区,有如下函数:

glVertexArrayVertexAttribOffsetEXT(
    this->handle,               // vao handle
    vbo.getHandle(),            // vbo handle
    index,                      // specifies the index of the generic vertex attribute to be modified.
    size,                       // number of components per generic vertex attribute
    vbo.getType(),              // specifies the data type of each component in the array
    normalized,                 // specifies whether fixed-point data values should be normalized
    stride,                     // specifies the byte offset between consecutive generic vertex attributes
    offset                      // specifies a pointer to the first component of the first generic vertex attribute in the array
    );

但是我找不到将元素缓冲区绑定(bind)到 vao 的方法。或者我错过了什么?

PS:添加 vertex-array-object 和 direct-state-access 标签有意义吗?

最佳答案

您找不到它,因为它不是它的一部分。

DSA 扩展是在 VAO 成为 GL3.0 的一部分之前设计的,并在后来进行了修改以与其交互。我不会感到惊讶这是规范中的一个漏洞。请随时联系规范所有者(列在 extension 顶部)

关于opengl - 如何使用直接状态访问将 'bind' 元素缓冲区数组转换为顶点数组对象?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3776726/

相关文章:

opengl - 如何在OpenGL中更改纹理的位置?

c++ - 无法在 OpenGl 上使用 AssImp 运行场景

C++ OpenGL 段错误(核心转储)运行时错误

opengl - Vertex Array Objects - 关于保存当前绑定(bind)的顶点缓冲区的确切状态信息的混淆

opengl - glVertexAttribDivisor 和 glVertexBindingDivisor 有什么区别?

windows - 如何编写检查 openGL 支持的安装程序?

c++ - Ubuntu 12.04 上的教程 OpenGL 4

opengl - 如何将 int 转换为 const GLvoid*?

OpenGL 顶点缓冲区对象,我可以访问顶点数据以用于其他用途(例如碰撞检测)吗?

python - 如何在 PyOpenGL 中使用 glBufferData()?