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 & k , 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
&
k
,
size_t
seed
= 0)
返回哈希值为 k ,使用 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
相等。