QShaderProgramBuilder Class

(Qt3DRender::QShaderProgramBuilder)

Generates a Shader Program content from loaded graphs. More...

Header: #include <QShaderProgramBuilder>
qmake: QT += 3drender
Since: Qt 5.10
Instantiated By: ShaderProgramBuilder
Inherits: Qt3DCore::QNode

Properties

Public Functions

QShaderProgramBuilder(Qt3DCore::QNode *parent = nullptr)
~QShaderProgramBuilder()
QUrl computeShaderGraph() const
QStringList enabledLayers() const
QUrl fragmentShaderGraph() const
QUrl geometryShaderGraph() const
QShaderProgram *shaderProgram() const
QUrl tessellationControlShaderGraph() const
QUrl tessellationEvaluationShaderGraph() const
QUrl vertexShaderGraph() const

Public Slots

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)

Signals

void computeShaderGraphChanged(const QUrl &computeShaderGraph)
void enabledLayersChanged(const QStringList &layers)
void fragmentShaderGraphChanged(const QUrl &fragmentShaderGraph)
void geometryShaderGraphChanged(const QUrl &geometryShaderGraph)
void shaderProgramChanged(Qt3DRender::QShaderProgram *shaderProgram)
void tessellationControlShaderGraphChanged(const QUrl &tessellationControlShaderGraph)
void tessellationEvaluationShaderGraphChanged(const QUrl &tessellationEvaluationShaderGraph)
void vertexShaderGraphChanged(const QUrl &vertexShaderGraph)

Protected Functions

QShaderProgramBuilder(QShaderProgramBuilderPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

Generates a Shader Program content from loaded graphs.

A shader program builder consists of several different shader graphs used to generate shader code.

Property Documentation

computeShaderGraph : QUrl

Holds the URL to the compute shader graph used by this shader program builder.

Access functions:

QUrl computeShaderGraph() const
void setComputeShaderGraph(const QUrl &computeShaderGraph)

Notifier signal:

void computeShaderGraphChanged(const QUrl &computeShaderGraph)

enabledLayers : QStringList

Holds the list of layers this builder will activate on the shader graphs during code generation.

Access functions:

QStringList enabledLayers() const
void setEnabledLayers(const QStringList &layers)

Notifier signal:

void enabledLayersChanged(const QStringList &layers)

fragmentShaderGraph : QUrl

Holds the URL to the fragment shader graph used by this shader program builder.

Access functions:

QUrl fragmentShaderGraph() const
void setFragmentShaderGraph(const QUrl &fragmentShaderGraph)

Notifier signal:

void fragmentShaderGraphChanged(const QUrl &fragmentShaderGraph)

geometryShaderGraph : QUrl

Holds the URL to the geometry shader graph used by this shader program builder.

Access functions:

QUrl geometryShaderGraph() const
void setGeometryShaderGraph(const QUrl &geometryShaderGraph)

Notifier signal:

void geometryShaderGraphChanged(const QUrl &geometryShaderGraph)

shaderProgram : Qt3DRender::QShaderProgram *

Holds the shader program on which this builder generates code.

Access functions:

QShaderProgram *shaderProgram() const
void setShaderProgram(Qt3DRender::QShaderProgram *program)

Notifier signal:

void shaderProgramChanged(Qt3DRender::QShaderProgram *shaderProgram)

tessellationControlShaderGraph : QUrl

Holds the URL to the tesselation control shader graph used by this shader program builder.

Access functions:

QUrl tessellationControlShaderGraph() const
void setTessellationControlShaderGraph(const QUrl &tessellationControlShaderGraph)

Notifier signal:

void tessellationControlShaderGraphChanged(const QUrl &tessellationControlShaderGraph)

tessellationEvaluationShaderGraph : QUrl

Holds the URL to the tesselation evaluation shader graph used by this shader program builder.

Access functions:

QUrl tessellationEvaluationShaderGraph() const
void setTessellationEvaluationShaderGraph(const QUrl &tessellationEvaluationShaderGraph)

Notifier signal:

void tessellationEvaluationShaderGraphChanged(const QUrl &tessellationEvaluationShaderGraph)

vertexShaderGraph : QUrl

Holds the URL to the vertex shader graph used by this shader program builder.

Access functions:

QUrl vertexShaderGraph() const
void setVertexShaderGraph(const QUrl &vertexShaderGraph)

Notifier signal:

void vertexShaderGraphChanged(const QUrl &vertexShaderGraph)

Member Function Documentation

QShaderProgramBuilder::QShaderProgramBuilder(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QShaderProgramBuilder.

[protected] QShaderProgramBuilder::QShaderProgramBuilder(QShaderProgramBuilderPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

QShaderProgramBuilder::~QShaderProgramBuilder()

Destroys the instance of QShaderProgramBuilder.

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