Sur cette page

Qt3DRender::QDispatchCompute Class

class Qt3DRender::QDispatchCompute

Nœud FrameGraph permettant d'effectuer du travail pour le shader de calcul sur le GPU. Plus d'informations...

En-tête : #include <QDispatchCompute>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake : QT += 3drender
En QML : DispatchCompute
Hérite : Qt3DRender::QFrameGraphNode
Statut : Déclassé

Propriétés

Fonctions publiques

QDispatchCompute(Qt3DCore::QNode *parent = nullptr)
int workGroupX() const
int workGroupY() const
int workGroupZ() const

Emplacements publics

void setWorkGroupX(int workGroupX)
void setWorkGroupY(int workGroupY)
void setWorkGroupZ(int workGroupZ)

Signaux

Description détaillée

Une entité Qt3DRender::QDispatchCompute permet d'émettre du travail pour que le shader de calcul s'exécute sur le GPU. Les propriétés workGroupX, workGroupY et workGroupZ spécifient la taille des groupes de travail pour l'invocation du shader de calcul. Les composants QComputeCommand doivent être ajoutés aux entités pour indiquer à Qt3D de sélectionner les matériaux et la géométrie des entités pour l'invocation du shader de calcul. La taille des groupes de travail pour l'invocation du shader sera le maximum des tailles de groupes de travail spécifiées dans QDispatchCompute et QComputeCommand.

Documentation sur les propriétés

workGroupX : int

Spécifie le groupe de travail X.

Fonctions d'accès :

int workGroupX() const
void setWorkGroupX(int workGroupX)

Signal de notification :

void workGroupXChanged()

workGroupY : int

Spécifie le groupe de travail Y.

Fonctions d'accès :

int workGroupY() const
void setWorkGroupY(int workGroupY)

Signal de notification :

void workGroupYChanged()

workGroupZ : int

Spécifie le groupe de travail Z.

Fonctions d'accès :

int workGroupZ() const
void setWorkGroupZ(int workGroupZ)

Signal de notification :

void workGroupZChanged()

Fonction membre Documentation

[explicit] QDispatchCompute::QDispatchCompute(Qt3DCore::QNode *parent = nullptr)

Le constructeur crée une instance avec l'adresse parent spécifiée.

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