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

发布于 2024-09-24 22:09:28 字数 906 浏览 2 评论 0原文

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

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:添加 vertex-array-object 和 direct-state-access 标签有意义吗?

For the other buffers there are functions like:

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

But i can't find a method for binding the element buffer to the vao. Or am i missing something there?

PS: does it make sense to add vertex-array-object and direct-state-access tags?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请远离我 2024-10-01 22:09:28

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

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

You can't find it because it's not part of it.

The DSA extension was designed prior to VAO being part of GL3.0, and modified later on to interact with it. I would not be surprised it's a hole in the specification. Feel free to contact the specification owner (listed at the top of the extension)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文