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 & k , 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
()
Constructs a new QShaderKey with shader type s , version sver , and variant svar .
Sets the shader type s .
另请参阅 source ().
Sets the type of variant to use to svar .
另请参阅 sourceVariant ().
Sets the shading language version sver .
另请参阅 sourceVersion ().
Returns the shader type.
另请参阅 setSource ().
Returns the type of the variant to use.
另请参阅 setSourceVariant ().
Returns the shading language version.
另请参阅 setSourceVersion ().
[noexcept]
size_t
qHash
(const
QShaderKey
&
k
,
size_t
seed
= 0)
返回哈希值为 k ,使用 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
相等。