QRhiDepthStencilClearValue Class

指定深度或模板缓冲区的清除值。更多

头文件: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Qt 6.6

公共函数

QRhiDepthStencilClearValue()
QRhiDepthStencilClearValue(float d, quint32 s)
float depthClearValue() const
void setDepthClearValue(float d)
void setStencilClearValue(quint32 s)
quint32 stencilClearValue() const
size_t qHash(const QRhiDepthStencilClearValue &key, size_t seed = 0)
bool operator!=(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b)
bool operator==(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b)

详细说明

注意: 这是一个 RHI API,具有有限的兼容性保证,详情请参见QRhi

成员函数文档

[constexpr noexcept] QRhiDepthStencilClearValue::QRhiDepthStencilClearValue()

创建深度/模板清除值,深度清除值为 1.0f,模板清除值为 0。

QRhiDepthStencilClearValue::QRhiDepthStencilClearValue(float d, quint32 s)

构建深度/模板清除值,深度清除值为d ,模板清除值为s

float QRhiDepthStencilClearValue::depthClearValue() const

返回深度清除值。大多数情况下为 1.0f。

另请参见 setDepthClearValue()。

void QRhiDepthStencilClearValue::setDepthClearValue(float d)

将深度清除值设置为d

另请参见 depthClearValue() 。

void QRhiDepthStencilClearValue::setStencilClearValue(quint32 s)

将模板清除值设置为s

另请参阅 stencilClearValue() 。

quint32 QRhiDepthStencilClearValue::stencilClearValue() const

返回模板清除值。大多数情况下为 0。

另请参见 setStencilClearValue()。

相关非会员

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

返回key 的哈希值,使用seed 作为计算的种子。

[noexcept] bool operator!=(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b)

如果两个QRhiDepthStencilClearValue 对象ab 中的值相等,则返回false ;否则返回true

[noexcept] bool operator==(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b)

如果两个QRhiDepthStencilClearValue 对象ab 中的值相等,则返回true

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.