Contains source or binary code for a shader and additional metadata. 更多...
| 頭: |
#include <QShaderCode>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
|
| qmake: |
QT += gui
|
| Since: | Qt 6.6 |
| 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 |
| size_t | qHash (const QShaderCode & key , size_t seed = 0) |
| bool | operator!= (const QShaderCode & lhs , const QShaderCode & rhs ) |
| bool | operator== (const QShaderCode & lhs , const QShaderCode & rhs ) |
當 shader () is empty after retrieving a QShaderCode instance from QShader , it indicates no shader code was found for the requested key.
注意: This is a RHI API with limited compatibility guarantees, see QShader 瞭解細節。
[constexpr noexcept]
QShaderCode::
QShaderCode
()
Constructs a new QShaderCode with the specified shader source code and entry point name.
Returns the entry point name.
另請參閱 setEntryPoint ().
設置 entry point name.
另請參閱 entryPoint ().
Sets the shader source or byte code .
另請參閱 shader ().
Returns the shader source or bytecode.
另請參閱 setShader ().
[noexcept]
size_t
qHash
(const
QShaderCode
&
key
,
size_t
seed
= 0)
返迴哈希值為 key ,使用 seed 做計算種子。
[noexcept]
bool
operator!=
(const
QShaderCode
&
lhs
, const
QShaderCode
&
rhs
)
返迴
false
if the values in the two
QShaderCode
對象
lhs
and
rhs
相等;否則返迴
true
.
[noexcept]
bool
operator==
(const
QShaderCode
&
lhs
, const
QShaderCode
&
rhs
)
返迴
true
若兩
QShaderCode
對象
lhs
and
rhs
相等。