Sur cette page

QSGGeometry::Attribute Struct

struct QSGGeometry::Attribute

L'QSGGeometry::Attribute e décrit un attribut de sommet unique dans une QSGGeometry. En savoir plus...

Membres publics statiques

QSGGeometry::Attribute create(int pos, int tupleSize, int primitiveType, bool isPosition = false)
QSGGeometry::Attribute createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType)

Description détaillée

La structure « QSGGeometry::Attribute » décrit la position dans le registre des attributs, la taille du tuple d'attributs et le type d'attribut.

Elle contient également une indication destinée au moteur de rendu si cet attribut est celui qui décrit la position. Le moteur de rendu du graphe de scène peut utiliser ces informations pour effectuer des optimisations.

Elle contient un certain nombre de bits réservés à un usage futur.

Voir également QSGGeometry.

Documentation des fonctions membres

[static] QSGGeometry::Attribute Attribute::create(int pos, int tupleSize, int primitiveType, bool isPosition = false)

Crée une nouvelle « QSGGeometry::Attribute » pour le registre d'attributs pos avec tupleSize. La « primitiveType » peut être n'importe lequel des types pris en charge répertoriés sur QSGGeometry::Type, tels que QSGGeometry::FloatType ou QSGGeometry::UnsignedByteType.

Si l’attribut décrit la position du sommet, l’indicateur « isPosition » doit être défini sur true. Le moteur de rendu du graphe de scène peut utiliser ces informations pour effectuer des optimisations.

Utilisez la fonction `create` pour construire l’attribut, plutôt qu’une liste d’initialisation, afin de garantir que tous les champs soient initialisés.

[static] QSGGeometry::Attribute Attribute::createWithAttributeType(int pos, int tupleSize, int primitiveType, QSGGeometry::AttributeType attributeType)

Crée une nouvelle entrée « QSGGeometry::Attribute » pour le registre d'attributs pos avec tupleSize. L'entrée « primitiveType » peut être n'importe lequel des types pris en charge répertoriés sur QSGGeometry::Type, tels que QSGGeometry::FloatType ou QSGGeometry::UnsignedByteType.

attributeType décrit l’utilisation prévue de l’attribut.

Utilisez la fonction create pour créer l’attribut, plutôt qu’une liste d’initialisation, afin de garantir que tous les champs soient initialisés.

© 2026 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.