Attribute QML Type
定义属性以及从缓冲区读取数据的方式。更多
Import Statement: | import Qt3D.Core 2.9 |
In C++: | QAttribute |
Status: | Deprecated |
详细说明
有 3 种类型的属性
- 顶点属性(VertexAttribute):用于定义按顶点读取的数据
- 索引属性(IndexAttribute):用于在使用索引绘制调用时定义顶点索引
- DrawIndirectAttribute(间接绘制属性):用于在使用间接绘制调用时指定要使用的 DrawIndirect 缓冲区
注意: 当属性类型为 DrawIndirectAttribute 时,只有 count、stride 和 offset 是相关的。
在提供您自己的属性时,使用 QAttribute::defaultPositionAttributeName() 等助手为您的属性命名可能会更有意义,因为这将确保您的几何体与 Qt3DExtras 模块中提供的拾取和各种材质兼容。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.