QRhiShaderStage Class

Specifies the type and the shader code for a shader stage in the pipeline. More...

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

Public Types

enum Type { Vertex, Fragment, Compute }

Public Functions

QRhiShaderStage()
QRhiShaderStage(QRhiShaderStage::Type type, const int &shader, int v = ...)
void setShader(const int &s)
void setShaderVariant(int v)
void setType(QRhiShaderStage::Type t)
int shader() const
int shaderVariant() const
QRhiShaderStage::Type type() const
uint qHash(const QRhiShaderStage &v, uint seed = 0)
bool operator!=(const QRhiShaderStage &a, const QRhiShaderStage &b)
bool operator==(const QRhiShaderStage &a, const QRhiShaderStage &b)

Detailed Description

Specifies the type and the shader code for a shader stage in the pipeline.

Member Type Documentation

enum QRhiShaderStage::Type

Specifies the type of the shader stage.

ConstantValueDescription
QRhiShaderStage::Vertex0Vertex stage
QRhiShaderStage::Fragment1Fragment (pixel) stage
QRhiShaderStage::Compute2Compute stage (this may not always be supported at run time)

Property Documentation

Member Function Documentation

QRhiShaderStage::QRhiShaderStage()

Constructs a shader stage description for the vertex stage with an empty QShader.

QRhiShaderStage::QRhiShaderStage(QRhiShaderStage::Type type, const int &shader, int v = ...)

Default constructs an instance of QRhiShaderStage.

void QRhiShaderStage::setShader(const int &s)

See also shader().

void QRhiShaderStage::setShaderVariant(int v)

See also shaderVariant().

void QRhiShaderStage::setType(QRhiShaderStage::Type t)

See also type().

int QRhiShaderStage::shader() const

See also setShader().

int QRhiShaderStage::shaderVariant() const

See also setShaderVariant().

QRhiShaderStage::Type QRhiShaderStage::type() const

See also setType().

Member Variable Documentation

Related Non-Members

uint qHash(const QRhiShaderStage &v, uint seed = 0)

Returns the hash value for v, using seed to seed the calculation.

bool operator!=(const QRhiShaderStage &a, const QRhiShaderStage &b)

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

bool operator==(const QRhiShaderStage &a, const QRhiShaderStage &b)

Returns true if the values in the two QRhiShaderStage objects a and b are equal.

Macro Documentation