QShaderProgram Class

(Qt3D::QShaderProgram)
Inherits:

Public Types

enum ShaderType { Vertex, Fragment, TessellationControl, TessellationEvaluation, Geometry, Compute }

Properties

Public Functions

QShaderProgram(QNode * parent = 0)
~QShaderProgram()
QByteArray computeShaderCode() const
QByteArray fragmentShaderCode() const
QByteArray geometryShaderCode() const
void setComputeShaderCode(const QByteArray & computeShaderCode)
void setFragmentShaderCode(const QByteArray & fragmentShaderCode)
void setGeometryShaderCode(const QByteArray & geometryShaderCode)
void setShaderCode(ShaderType type, const QByteArray & shaderCode)
void setTessellationControlShaderCode(const QByteArray & tessellationControlShaderCode)
void setTessellationEvaluationShaderCode(const QByteArray & tessellationEvaluationShaderCode)
void setVertexShaderCode(const QByteArray & vertexShaderCode)
QByteArray shaderCode(ShaderType type) const
QByteArray tessellationControlShaderCode() const
QByteArray tessellationEvaluationShaderCode() const
QByteArray vertexShaderCode() const

Signals

Static Public Members

QByteArray loadSource(const QUrl & sourceUrl)

Protected Functions

void copy(const QNode * ref)

Member Type Documentation

enum QShaderProgram::ShaderType

Property Documentation

computeShaderCode : QByteArray

Access functions:

QByteArray computeShaderCode() const
void setComputeShaderCode(const QByteArray & computeShaderCode)

Notifier signal:

void computeShaderCodeChanged()

fragmentShaderCode : QByteArray

Access functions:

QByteArray fragmentShaderCode() const
void setFragmentShaderCode(const QByteArray & fragmentShaderCode)

Notifier signal:

void fragmentShaderCodeChanged()

geometryShaderCode : QByteArray

Access functions:

QByteArray geometryShaderCode() const
void setGeometryShaderCode(const QByteArray & geometryShaderCode)

Notifier signal:

void geometryShaderCodeChanged()

tessellationControlShaderCode : QByteArray

Access functions:

QByteArray tessellationControlShaderCode() const
void setTessellationControlShaderCode(const QByteArray & tessellationControlShaderCode)

Notifier signal:

void tessellationControlShaderCodeChanged()

tessellationEvaluationShaderCode : QByteArray

Access functions:

QByteArray tessellationEvaluationShaderCode() const
void setTessellationEvaluationShaderCode(const QByteArray & tessellationEvaluationShaderCode)

Notifier signal:

void tessellationEvaluationShaderCodeChanged()

vertexShaderCode : QByteArray

Access functions:

QByteArray vertexShaderCode() const
void setVertexShaderCode(const QByteArray & vertexShaderCode)

Notifier signal:

void vertexShaderCodeChanged()

Member Function Documentation

QShaderProgram::QShaderProgram(QNode * parent = 0)

QShaderProgram::~QShaderProgram()

[protected] void QShaderProgram::copy(const QNode * ref)

[static] QByteArray QShaderProgram::loadSource(const QUrl & sourceUrl)

void QShaderProgram::setFragmentShaderCode(const QByteArray & fragmentShaderCode)

Sets the fragmentShader from raw data in fragmentShader.

Note: Setter function for property fragmentShaderCode.

See also fragmentShaderCode().

void QShaderProgram::setShaderCode(ShaderType type, const QByteArray & shaderCode)

See also shaderCode().

void QShaderProgram::setVertexShaderCode(const QByteArray & vertexShaderCode)

Sets the vertexShader from raw data in vertexShader.

Note: Setter function for property vertexShaderCode.

See also vertexShaderCode().

QByteArray QShaderProgram::shaderCode(ShaderType type) const

See also setShaderCode().

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