QSSGRhiGraphicsPipelineState Class
空间场景图的图形管道状态。更多...
| Header: | #include <qssgrhicontext.h> |
| Since: | Qt 6.7 |
公共类型
| enum class | Flag { DepthTestEnabled, DepthWriteEnabled, BlendEnabled, UsesStencilRef, UsesScissor } |
| flags | Flags |
公共变量
| int | colorAttachmentCount |
| QRhiGraphicsPipeline::CullMode | cullMode |
| int | depthBias |
| QRhiGraphicsPipeline::CompareOp | depthFunc |
| float | lineWidth |
| QRhiGraphicsPipeline::PolygonMode | polygonMode |
| int | samples |
| QRhiScissor | scissor |
| float | slopeScaledDepthBias |
| QRhiGraphicsPipeline::StencilOpState | stencilOpFrontState |
| quint32 | stencilRef |
| quint32 | stencilWriteMask |
| std::array<QRhiGraphicsPipeline::TargetBlend, 8> | targetBlend |
| QRhiViewport | viewport |
详细描述
该类是一个便利类,由QtQuick3D 使用,用于封装来自QRhi 类的相关管道状态,例如QRhiGraphicsPipeline 。因此,QSSGRhiGraphicsPipelineState中使用的大多数类型和值将直接映射到等效的QRhi 类型或类。
成员类型文档
enum class QSSGRhiGraphicsPipelineState::Flag
flags QSSGRhiGraphicsPipelineState::Flags
| 常数 | 常量 |
|---|---|
QSSGRhiGraphicsPipelineState::Flag::DepthTestEnabled | 0x1 |
QSSGRhiGraphicsPipelineState::Flag::DepthWriteEnabled | 0x2 |
QSSGRhiGraphicsPipelineState::Flag::BlendEnabled | 0x4 |
QSSGRhiGraphicsPipelineState::Flag::UsesStencilRef | 0x8 |
QSSGRhiGraphicsPipelineState::Flag::UsesScissor | 0x10 |
Flags 类型是QFlags<Flag> 的 typedef 定义。它存储 Flag 值的按“或”运算组合。
成员变量文档
int QSSGRhiGraphicsPipelineState::colorAttachmentCount
颜色附件的数量。默认值为 1。
另请参阅 QRhiTextureRenderTargetDescription::setColorAttachments() 和QRhiTextureRenderTargetDescription::colorAttachmentCount()。
QRhiGraphicsPipeline::CullMode QSSGRhiGraphicsPipelineState::cullMode
指定剔除模式。
另请参阅 QRhiGraphicsPipeline::CullMode 。
int QSSGRhiGraphicsPipelineState::depthBias
深度偏置。默认值为 0。
另请参阅 QRhiGraphicsPipeline::depthBias()。
QRhiGraphicsPipeline::CompareOp QSSGRhiGraphicsPipelineState::depthFunc
深度比较函数。
另请参阅 QRhiGraphicsPipeline::CompareOp 。
float QSSGRhiGraphicsPipelineState::lineWidth
使用的线宽。默认值为 1.0
注意:若 值不为 1.0,则必须在运行时声明支持QRhi::WideLines 功能。
QRhiGraphicsPipeline::PolygonMode QSSGRhiGraphicsPipelineState::polygonMode
多边形模式的值。默认值为Fill 。
另请参阅 QRhiGraphicsPipeline::polygonMode()。
int QSSGRhiGraphicsPipelineState::samples
采样次数。
注意: 采样计数为 1 表示不进行多采样抗锯齿处理。
另请参阅 QRhiSwapChain::sampleCount()。
QRhiScissor QSSGRhiGraphicsPipelineState::scissor
剪刀矩形。
注意:仅 当设置了UsesScissor 时才 使用。
另请参阅 QRhiCommandBuffer::setScissor()。
float QSSGRhiGraphicsPipelineState::slopeScaledDepthBias
斜率缩放深度偏差。默认值为 0。
另请参阅 QRhiGraphicsPipeline::slopeScaledDepthBias()。
QRhiGraphicsPipeline::StencilOpState QSSGRhiGraphicsPipelineState::stencilOpFrontState
描述模板的操作状态。
另请参阅 QRhiGraphicsPipeline::StencilOpState 。
quint32 QSSGRhiGraphicsPipelineState::stencilRef
当前的模板参考值。
注意:仅 在设置了UsesStencilRef 时使用。
另请参阅 QRhiCommandBuffer::setStencilRef()。
quint32 QSSGRhiGraphicsPipelineState::stencilWriteMask
模板写入掩码值。默认值为0xFF 。
另请参阅 QRhiGraphicsPipeline::stencilWriteMask()。
std::array<QRhiGraphicsPipeline::TargetBlend, 8> QSSGRhiGraphicsPipelineState::targetBlend
一种颜色附件的混合状态。
另请参阅 QRhiGraphicsPipeline::TargetBlend 。
QRhiViewport QSSGRhiGraphicsPipelineState::viewport
用于渲染的视口尺寸。
© 2026 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.