QShaderCode Class

Contains source or binary code for a shader and additional metadata. More...

Header: #include <QShaderCode>
qmake: QT += rhi

Public Functions

QShaderCode()
QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray())
QByteArray entryPoint() const
void setEntryPoint(const QByteArray &entry)
void setShader(const QByteArray &code)
QByteArray shader() const
bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs)
bool operator==(const QShaderCode &lhs, const QShaderCode &rhs)

Detailed Description

Contains source or binary code for a shader and additional metadata.

When shader() is empty after retrieving a QShaderCode instance from QShader, it indicates no shader code was found for the requested key.

Member Type Documentation

Property Documentation

Member Function Documentation

QShaderCode::QShaderCode()

Default constructs an instance of QShaderCode.

QShaderCode::QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray())

Default constructs an instance of QShaderCode.

QByteArray QShaderCode::entryPoint() const

See also setEntryPoint().

void QShaderCode::setEntryPoint(const QByteArray &entry)

See also entryPoint().

void QShaderCode::setShader(const QByteArray &code)

See also shader().

QByteArray QShaderCode::shader() const

See also setShader().

Member Variable Documentation

Related Non-Members

bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs)

Returns false if the values in the two QShaderCode objects a and b are equal; otherwise returns true.

bool operator==(const QShaderCode &lhs, const QShaderCode &rhs)

Returns true if the two QShaderCode objects a and b are equal.

Macro Documentation