代码之家  ›  专栏  ›  技术社区  ›  fho

如何使用直接状态访问将元素缓冲区数组“绑定”到顶点数组对象?

  •  3
  • fho  · 技术社区  · 14 年前

    对于其他缓冲区,有如下功能:

    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
        );
    

    但我找不到将元素缓冲区绑定到VAO的方法。或者我是在那里找不到什么东西?

    PS:添加顶点数组对象和直接状态访问标签有意义吗?

    1 回复  |  直到 12 年前
        1
  •  5
  •   Bahbar    14 年前

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

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