Qt3DRender::QShaderProgramBuilder Class
class Qt3DRender::QShaderProgramBuilder로드된 그래프를 기반으로 셰이더 프로그램 콘텐츠를 생성합니다. 더 보기...
| 헤더: | #include <qshaderprogrambuilder.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| QML에서: | ShaderProgramBuilder |
| 상속: | Qt3DCore::QNode |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
속성
|
|
공개 함수
| QByteArray | computeShaderCode() const |
| QUrl | computeShaderGraph() const |
| QStringList | enabledLayers() const |
| QByteArray | fragmentShaderCode() const |
| QUrl | fragmentShaderGraph() const |
| QByteArray | geometryShaderCode() const |
| QUrl | geometryShaderGraph() const |
| Qt3DRender::QShaderProgram * | shaderProgram() const |
| QByteArray | tessellationControlShaderCode() const |
| QUrl | tessellationControlShaderGraph() const |
| QByteArray | tessellationEvaluationShaderCode() const |
| QUrl | tessellationEvaluationShaderGraph() const |
| QByteArray | vertexShaderCode() const |
| QUrl | vertexShaderGraph() const |
공개 슬롯
| void | setComputeShaderGraph(const QUrl &computeShaderGraph) |
| void | setEnabledLayers(const QStringList &layers) |
| void | setFragmentShaderGraph(const QUrl &fragmentShaderGraph) |
| void | setGeometryShaderGraph(const QUrl &geometryShaderGraph) |
| void | setShaderProgram(Qt3DRender::QShaderProgram *program) |
| void | setTessellationControlShaderGraph(const QUrl &tessellationControlShaderGraph) |
| void | setTessellationEvaluationShaderGraph(const QUrl &tessellationEvaluationShaderGraph) |
| void | setVertexShaderGraph(const QUrl &vertexShaderGraph) |
신호
| void | computeShaderCodeChanged(const QByteArray &computeShaderCode) |
| void | computeShaderGraphChanged(const QUrl &computeShaderGraph) |
| void | enabledLayersChanged(const QStringList &layers) |
| void | fragmentShaderCodeChanged(const QByteArray &fragmentShaderCode) |
| void | fragmentShaderGraphChanged(const QUrl &fragmentShaderGraph) |
| void | geometryShaderCodeChanged(const QByteArray &geometryShaderCode) |
| void | geometryShaderGraphChanged(const QUrl &geometryShaderGraph) |
| void | shaderProgramChanged(Qt3DRender::QShaderProgram *shaderProgram) |
| void | tessellationControlShaderCodeChanged(const QByteArray &tessellationControlShaderCode) |
| void | tessellationControlShaderGraphChanged(const QUrl &tessellationControlShaderGraph) |
| void | tessellationEvaluationShaderCodeChanged(const QByteArray &tessellationEvaluationShaderCode) |
| void | tessellationEvaluationShaderGraphChanged(const QUrl &tessellationEvaluationShaderGraph) |
| void | vertexShaderCodeChanged(const QByteArray &vertexShaderCode) |
| void | vertexShaderGraphChanged(const QUrl &vertexShaderGraph) |
상세 설명
셰이더 프로그램 빌더는 셰이더 코드를 생성하는 데 사용되는 여러 가지 셰이더 그래프로 구성됩니다.
생성된 셰이더 코드의 캐시가 유지됩니다. 생성된 셰이더는 기본적으로 QStandardPaths::writableLocation(QStandardPaths::TempLocation)에 저장됩니다. 이 경로는 환경 변수 QT3D_WRITABLE_CACHE_PATH를 유효한 쓰기 가능한 경로로 설정하여 재정의할 수 있습니다.
환경 변수 QT3D_DISABLE_SHADER_CACHE를 설정하여 캐시 사용을 비활성화할 수 있습니다.
대부분의 경우, 그래프에 가해진 변경 사항은 Qt 3D 에 의해 감지되며 새로운 캐시 항목이 생성됩니다. 그래프에 포함된 코드 스니펫이 변경된 경우에는 이러한 동작이 발생하지 않습니다. 이 문제를 해결하려면 캐시 디렉터리를 지우거나 환경 변수 QT3D_REBUILD_SHADER_CACHE를 설정하여 셰이더 코드가 다시 생성되도록 강제할 수 있습니다.
속성 설명서
[read-only] computeShaderCode : QByteArray
컴퓨트 셰이더 코드를 생성하여 저장합니다.
액세스 함수:
| QByteArray | computeShaderCode() const |
알림 신호:
| void | computeShaderCodeChanged(const QByteArray &computeShaderCode) |
computeShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 컴퓨트 셰이더 그래프의 URL을 저장합니다.
액세스 함수:
| QUrl | computeShaderGraph() const |
| void | setComputeShaderGraph(const QUrl &computeShaderGraph) |
알림 신호:
| void | computeShaderGraphChanged(const QUrl &computeShaderGraph) |
enabledLayers : QStringList
코드 생성 시 이 빌더가 셰이더 그래프에서 활성화할 레이어 목록을 포함합니다.
액세스 함수:
| QStringList | enabledLayers() const |
| void | setEnabledLayers(const QStringList &layers) |
알림 신호:
| void | enabledLayersChanged(const QStringList &layers) |
[read-only] fragmentShaderCode : QByteArray
프래그먼트 셰이더 코드를 생성하여 저장합니다.
액세스 함수:
| QByteArray | fragmentShaderCode() const |
알림 신호:
| void | fragmentShaderCodeChanged(const QByteArray &fragmentShaderCode) |
fragmentShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 프래그먼트 셰이더 그래프의 URL을 저장합니다.
액세스 함수:
| QUrl | fragmentShaderGraph() const |
| void | setFragmentShaderGraph(const QUrl &fragmentShaderGraph) |
알림 신호:
| void | fragmentShaderGraphChanged(const QUrl &fragmentShaderGraph) |
[read-only] geometryShaderCode : QByteArray
지오메트리 셰이더 코드 생성을 담당합니다.
액세스 함수:
| QByteArray | geometryShaderCode() const |
알림 신호:
| void | geometryShaderCodeChanged(const QByteArray &geometryShaderCode) |
geometryShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 지오메트리 셰이더 그래프의 URL을 보관합니다.
액세스 함수:
| QUrl | geometryShaderGraph() const |
| void | setGeometryShaderGraph(const QUrl &geometryShaderGraph) |
알림 신호:
| void | geometryShaderGraphChanged(const QUrl &geometryShaderGraph) |
shaderProgram : Qt3DRender::QShaderProgram*
이 빌더가 코드를 생성하는 데 사용하는 셰이더 프로그램을 보관합니다.
액세스 함수:
| Qt3DRender::QShaderProgram * | shaderProgram() const |
| void | setShaderProgram(Qt3DRender::QShaderProgram *program) |
알림 신호:
| void | shaderProgramChanged(Qt3DRender::QShaderProgram *shaderProgram) |
[read-only] tessellationControlShaderCode : QByteArray
테셀레이션 제어 셰이더 코드를 생성하는 기능을 담당합니다.
액세스 함수:
| QByteArray | tessellationControlShaderCode() const |
알림 신호:
| void | tessellationControlShaderCodeChanged(const QByteArray &tessellationControlShaderCode) |
tessellationControlShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 테셀레이션 제어 셰이더 그래프의 URL을 저장합니다.
액세스 함수:
| QUrl | tessellationControlShaderGraph() const |
| void | setTessellationControlShaderGraph(const QUrl &tessellationControlShaderGraph) |
알림 신호:
| void | tessellationControlShaderGraphChanged(const QUrl &tessellationControlShaderGraph) |
[read-only] tessellationEvaluationShaderCode : QByteArray
테셀레이션 생성 평가 셰이더 코드를 포함합니다.
액세스 함수:
| QByteArray | tessellationEvaluationShaderCode() const |
알림 신호:
| void | tessellationEvaluationShaderCodeChanged(const QByteArray &tessellationEvaluationShaderCode) |
tessellationEvaluationShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 테셀레이션 평가 셰이더 그래프의 URL을 저장합니다.
액세스 함수:
| QUrl | tessellationEvaluationShaderGraph() const |
| void | setTessellationEvaluationShaderGraph(const QUrl &tessellationEvaluationShaderGraph) |
알림 신호:
| void | tessellationEvaluationShaderGraphChanged(const QUrl &tessellationEvaluationShaderGraph) |
[read-only] vertexShaderCode : QByteArray
버텍스 셰이더 코드를 생성하는 기능을 포함합니다.
액세스 함수:
| QByteArray | vertexShaderCode() const |
알림 신호:
| void | vertexShaderCodeChanged(const QByteArray &vertexShaderCode) |
vertexShaderGraph : QUrl
이 셰이더 프로그램 빌더에서 사용하는 버텍스 셰이더 그래프의 URL을 저장합니다.
액세스 함수:
| QUrl | vertexShaderGraph() const |
| void | setVertexShaderGraph(const QUrl &vertexShaderGraph) |
알림 신호:
| void | vertexShaderGraphChanged(const QUrl &vertexShaderGraph) |
© 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.