QSGGeometry::Attribute Struct
struct QSGGeometry::AttributeQSGGeometry::Attribute 描述QSGGeometry 中的单个顶点属性 ... 更多...
静态公共成员
QSGGeometry::Attribute | create(int pos, int tupleSize, int primitiveType, bool isPosition = false) |
QSGGeometry::Attribute | createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType) |
详细描述
QSGGeometry::Attribute 结构描述了属性寄存器位置、属性元组大小和属性类型。
如果该属性是描述位置的属性,该结构体还包含对渲染器的提示。场景图呈现器可使用此信息进行优化。
它还包含一些为将来使用而保留的位。
另请参阅 QSGGeometry 。
成员函数文档
[static]
QSGGeometry::Attribute Attribute::create(int pos, int tupleSize, int primitiveType, bool isPosition = false)
通过tupleSize 为属性寄存器pos 创建新的QSGGeometry::Attribute 。primitiveType 可以是QSGGeometry::Type 中支持的任何类型,如QSGGeometry::FloatType 或QSGGeometry::UnsignedByteType 。
如果属性描述了顶点的位置,isPosition 提示应设置为true
。场景图渲染器可能会使用此信息进行优化。
使用创建函数而不是初始化列表来构建属性,以确保所有字段都已初始化。
[static]
QSGGeometry::Attribute Attribute::createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType)
通过tupleSize 为属性寄存器pos 创建新的QSGGeometry::Attribute 。primitiveType 可以是QSGGeometry::Type 支持的任何类型,如QSGGeometry::FloatType 或QSGGeometry::UnsignedByteType 。
attributeType 描述属性的预期用途。
使用创建函数而不是初始化列表来构建属性,可确保所有字段都已初始化。
© 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.