[Development] QRhi - how to not clear depth/stencil buffer
Harald Vistnes
harald.vistnes at gmail.com
Wed Mar 26 08:27:14 CET 2025
Never mind. I found
the QRhiTextureRenderTarget::PreserveDepthStencilContents flag.
Harald
ons. 26. mars 2025 kl. 08:12 skrev Harald Vistnes <harald.vistnes at gmail.com
>:
> Hi,
>
> I am developing a multi-pass rendering algorithm using QRhi.
>
> In the first pass I create one render target and a depth/stencil buffer.
> In the second pass I create another render target, but I reuse the
> depth/stencil buffer from the first pass.
>
> However, the depth/stencil buffer is cleared when I start the second pass
> in the call to
>
> void QRhiCommandBuffer::beginPass(QRhiRenderTarget *rt,
> const QColor &colorClearValue,
> const QRhiDepthStencilClearValue
> &depthStencilClearValue,
> QRhiResourceUpdateBatch *resourceUpdates = nullptr,
> BeginPassFlags flags = {});
>
> Is there some trick to not having to clear the render target and/or
> depth/stencil buffer at the start of a pass?
>
> Best wishes,
> Harald
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250326/5c352ac2/attachment.htm>
More information about the Development
mailing list