Sur cette page

QSGGeometry::Attribute Struct

struct QSGGeometry::Attribute

Le site QSGGeometry::Attribute décrit un seul attribut de sommet dans un site QSGGeometry. 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 du registre d'attribut, la taille du tuple d'attribut et le type d'attribut.

Elle contient également un indice permettant au moteur de rendu de savoir si cet attribut est l'attribut décrivant la position. Le moteur de rendu du graphe de scène peut utiliser ces informations pour effectuer des optimisations.

Il contient un certain nombre de bits qui sont réservés pour une utilisation future.

Voir également QSGGeometry.

Documentation des fonctions membres

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

Crée un nouveau QSGGeometry::Attribute pour le registre d'attributs pos avec tupleSize. L'adresse primitiveType peut être l'un des types pris en charge par QSGGeometry::Type, tels que QSGGeometry::FloatType ou QSGGeometry::UnsignedByteType.

Si l'attribut décrit la position du sommet, l'indice 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 vous assurer que tous les champs sont initialisés.

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

Crée un nouveau QSGGeometry::Attribute pour le registre d'attributs pos avec tupleSize. L'adresse primitiveType peut être l'un des types pris en charge par QSGGeometry::Type, tels que QSGGeometry::FloatType ou QSGGeometry::UnsignedByteType.

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

Utilisez la fonction create pour construire l'attribut, plutôt qu'une liste d'initialisation, afin de vous assurer que tous les champs sont 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.