opengl - OpenGL glVertexArrayAttribBinding bindingIndex
问题描述
在 pre-DSA opengl 中,指定顶点数组属性格式的方法是这样的:
glBindVertexArray(VA);
glEnableVertexAttribArray(attribIndex);
glVertexAttribPointer(attribIndex, count, type, normalized, stride, pointer);
使用 DSA 类似于:
glVertexArrayVertexBuffer(VA, bindingIndex, VB, offset, stride);
glEnableVertexArrayAttrib(VA, attribIndex);
glVertexArrayAttribFormat(VA, attribIndex, count, type, normalized, relOffset);
glVertexArrayAttribBinding(VA, attribIndex, bindingIndex);
我的问题是:
- 什么是 bindingIndex,它有什么作用?
- 为什么 glVertexArrayAttribFormat 与 glVertexArrayAttribBinding 分开?这样做有什么好处吗?
- 例如,它与统一缓冲区绑定点有什么关系?
解决方案
推荐阅读
- android - 安装 'cordova-plugin-firebase' 失败:CordovaError: Uh oh
- linux - 如何为 macOS 应用程序包和 linux 可执行文件签署数字签名
- sql-server - Cast char '-' 减去为什么它在 sql server 2016 中变成零“0”?
- javascript - 我可以在不使用登录弹出窗口的情况下使用 google api 吗?
- c++ - av_bitstream_filter_filter 内存泄漏
- python - 如何根据 Django 1.11 和 postgres 9.6 中的嵌套 JSONField 注释计数
- java - Java验证bean:验证枚举字段值
- string - 如何将具有多个参数的单个字符串传递给 std::process::Command?
- excel - Countif 公式从日历表中计算天数
- python - openpyxl - 如何将图像添加到工作表?