QRhiGraphicsPipeline::TargetBlend Struct

struct QRhiGraphicsPipeline::TargetBlend

描述一种颜色附件的混合状态。更多

此结构在 Qt 6.6 中引入。

公共变量

QRhiGraphicsPipeline::ColorMask colorWrite
QRhiGraphicsPipeline::BlendFactor dstAlpha
QRhiGraphicsPipeline::BlendFactor dstColor
bool enable
QRhiGraphicsPipeline::BlendOp opAlpha
QRhiGraphicsPipeline::BlendOp opColor
QRhiGraphicsPipeline::BlendFactor srcAlpha
QRhiGraphicsPipeline::BlendFactor srcColor

详细说明

默认启用颜色写入,禁用混合。默认情况下,混合值为预乘法 alpha 设置(One,OneMinusSrcAlpha, One,OneMinusSrcAlpha )。这意味着要获得Qt Quick 使用的 alpha 混合模式,只需将enable 标志设为 true,其他值保持默认即可。

注意: 这是一个 RHI API,兼容性保证有限,详情请查看QRhi

成员变量文档

QRhiGraphicsPipeline::ColorMask TargetBlend::colorWrite

QRhiGraphicsPipeline::BlendFactor TargetBlend::dstAlpha

QRhiGraphicsPipeline::BlendFactor TargetBlend::dstColor

bool TargetBlend::enable

QRhiGraphicsPipeline::BlendOp TargetBlend::opAlpha

QRhiGraphicsPipeline::BlendOp TargetBlend::opColor

QRhiGraphicsPipeline::BlendFactor TargetBlend::srcAlpha

QRhiGraphicsPipeline::BlendFactor TargetBlend::srcColor

© 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.