QShaderKey Class

Specifies the shading language, the version with flags, and the variant. 更多...

頭: #include <QShaderKey>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.6

公共函數

QShaderKey ()
QShaderKey (QShader::Source s , const QShaderVersion & sver , QShader::Variant svar = QShader::StandardShader)
void setSource (QShader::Source s )
void setSourceVariant (QShader::Variant svar )
void setSourceVersion (const QShaderVersion & sver )
QShader::Source source () const
QShader::Variant sourceVariant () const
QShaderVersion sourceVersion () const
size_t qHash (const QShaderKey & key , size_t seed = 0)
bool operator!= (const QShaderKey & lhs , const QShaderKey & rhs )
bool operator< (const QShaderKey & lhs , const QShaderKey & rhs )
bool operator== (const QShaderKey & lhs , const QShaderKey & rhs )

詳細描述

A default constructed QShaderKey has source set to SpirvShader and sourceVersion set to 100. sourceVariant defaults to StandardShader.

注意: This is a RHI API with limited compatibility guarantees, see QShader 瞭解細節。

成員函數文檔編製

[constexpr noexcept] QShaderKey:: QShaderKey ()

QShaderKey:: QShaderKey ( QShader::Source s , const QShaderVersion & sver , QShader::Variant svar = QShader::StandardShader)

Constructs a new QShaderKey with shader type s , version sver , and variant svar .

void QShaderKey:: setSource ( QShader::Source s )

Sets the shader type s .

另請參閱 source ().

void QShaderKey:: setSourceVariant ( QShader::Variant svar )

Sets the type of variant to use to svar .

另請參閱 sourceVariant ().

void QShaderKey:: setSourceVersion (const QShaderVersion & sver )

Sets the shading language version sver .

另請參閱 sourceVersion ().

QShader::Source QShaderKey:: source () const

Returns the shader type.

另請參閱 setSource ().

QShader::Variant QShaderKey:: sourceVariant () const

Returns the type of the variant to use.

另請參閱 setSourceVariant ().

QShaderVersion QShaderKey:: sourceVersion () const

Returns the shading language version.

另請參閱 setSourceVersion ().

相關非成員

[noexcept] size_t qHash (const QShaderKey & key , size_t seed = 0)

返迴哈希值為 key ,使用 seed 做計算種子。

[noexcept] bool operator!= (const QShaderKey & lhs , const QShaderKey & rhs )

返迴 false if the values in the two QShaderKey 對象 lhs and rhs 相等;否則返迴 true .

[noexcept] bool operator< (const QShaderKey & lhs , const QShaderKey & rhs )

返迴 true 若 lhs < rhs .

Establishes a sorting order between the two keys lhs and rhs .

[noexcept] bool operator== (const QShaderKey & lhs , const QShaderKey & rhs )

返迴 true 若兩 QShaderKey 對象 lhs and rhs 相等。