QComputeCommand Class

class Qt3DRender::QComputeCommand

GPU에서 컴퓨팅 셰이더에 대한 작업을 발행하는 Q컴포넌트입니다. 더 보기...

헤더: #include <QComputeCommand>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML에서: ComputeCommand
상속합니다: Qt3DCore::QComponent
상태: Deprecated

속성

공용 기능

QComputeCommand(Qt3DCore::QNode *parent = nullptr)
Qt3DRender::QComputeCommand::RunType runType() const
int workGroupX() const
int workGroupY() const
int workGroupZ() const

공용 슬롯

void setRunType(Qt3DRender::QComputeCommand::RunType runType)
void setWorkGroupX(int workGroupX)
void setWorkGroupY(int workGroupY)
void setWorkGroupZ(int workGroupZ)
void trigger(int frameCount = 1)
void trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1)

신호

상세 설명

Qt3DRender::QComputeCommand 은 컴퓨트 셰이더에 작업을 발급하는 데 사용됩니다. 컴퓨트 셰이더는 QComputeCommand가 추가된 것과 동일한 엔티티의 QMaterial 컴포넌트에 지정됩니다. workGroupX , workGroupYworkGroupZ 프로퍼티는 계산 셰이더 호출을 위한 작업 그룹 크기를 지정합니다. 실제로 명령을 실행하려면 Qt3DRender::QDispatchCompute 노드가 프레임그래프에 있어야 합니다.

참고: 렌더링 정책이 Qt3DRender::QRenderSettings::OnDemand 로 설정되어 있고 씬에 변경 사항이 없는 경우 ComputeCommand 은 반복적으로 호출되지 않습니다. 새 프레임 렌더링을 트리거하는 장면에 다른 변경 사항이 없는 경우 ComputeCommand 이 반복적으로 호출되려면 Qt3DRender::QRenderSettings::Always 렌더링 정책을 설정해야 합니다.

속성 문서

runType : RunType

매 프레임마다 계산 명령을 수행할지 아니면 수동으로 트리거할지 지정합니다.

지속으로 설정하면 매 프레임마다 계산 명령이 실행됩니다. 이것이 기본값입니다.

Manual로 설정하면 지정된 프레임 수 동안 ComputeCommand가 실행된 후 컴포넌트가 자체적으로 비활성화됩니다.

함수 액세스:

Qt3DRender::QComputeCommand::RunType runType() const
void setRunType(Qt3DRender::QComputeCommand::RunType runType)

알림 신호:

void runTypeChanged()

workGroupX : int

X 작업 그룹 크기를 지정합니다.

기능에 액세스합니다:

int workGroupX() const
void setWorkGroupX(int workGroupX)

알림 신호:

void workGroupXChanged()

workGroupY : int

Y 작업 그룹 크기를 지정합니다.

기능에 액세스합니다:

int workGroupY() const
void setWorkGroupY(int workGroupY)

알림 신호:

void workGroupYChanged()

workGroupZ : int

Z 워크그룹 크기를 지정합니다.

기능에 액세스합니다:

int workGroupZ() const
void setWorkGroupZ(int workGroupZ)

알림 신호:

void workGroupZChanged()

멤버 함수 문서

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

생성자는 지정된 parent 을 사용하여 새 Qt3DRender::QComputeCommand 인스턴스를 생성합니다.

[slot] void QComputeCommand::setWorkGroupX(int workGroupX)

첫 번째 차원에 대한 작업 그룹을 workGroupX 으로 설정합니다.

참고: 속성에 대한 설정자 함수 workGroupX.

workGroupX()도 참조하세요 .

[slot] void QComputeCommand::setWorkGroupY(int workGroupY)

두 번째 차원에 대한 작업 그룹을 workGroupY 으로 설정합니다.

참고: 속성에 대한 설정자 함수 workGroupY.

workGroupY()도 참조하세요 .

[slot] void QComputeCommand::setWorkGroupZ(int workGroupZ)

세 번째 차원에 대한 작업 그룹을 workGroupZ 으로 설정합니다.

참고: 속성에 대한 설정자 함수 workGroupZ.

workGroupZ()도 참조하세요 .

[slot] void QComputeCommand::trigger(int frameCount = 1)

실행 유형이 수동으로 설정된 경우 트리거를 호출하면 다음 frameCount 프레임에 대해 계산 명령이 실행됩니다. 실행이 완료되면 enabled 속성은 false로 설정됩니다.

[slot] void QComputeCommand::trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1)

실행 유형이 수동으로 설정된 경우 트리거를 호출하면 다음 frameCount 프레임에 대해 계산 명령이 실행됩니다. 실행이 완료되면 enabled 속성이 false로 설정됩니다. 이전에 설정한 작업 그룹의 크기는 workGroupX, workGroupY, workGroupZ 로 재정의됩니다.

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