Loading...
Searching...
No Matches
score::gfx::OffscreenFrame Struct Reference
RAII bracket for QRhi::beginOffscreenFrame / endOffscreenFrame. More...
Detailed Description
RAII bracket for QRhi::beginOffscreenFrame / endOffscreenFrame.
A frame that is begun is always ended, including when the scope is left by an exception: QRhi keeps inFrame set otherwise and every later beginFrame / beginOffscreenFrame on that QRhi silently does nothing for the rest of the session.
beginOffscreenFrame returns FrameOpSuccess without writing the command buffer when a frame is already recording (qrhi.cpp only warns and returns early), so success alone does not mean a frame was opened here. In that case the scope owns nothing and must not end the frame that is already running.
Public Member Functions | |
| OffscreenFrame (QRhi &rhi) noexcept | |
| OffscreenFrame (const OffscreenFrame &)=delete | |
| OffscreenFrame (OffscreenFrame &&)=delete | |
| OffscreenFrame & | operator= (const OffscreenFrame &)=delete |
| OffscreenFrame & | operator= (OffscreenFrame &&)=delete |
| operator bool () const noexcept | |
| QRhiCommandBuffer & | commands () const noexcept |
| QRhi::FrameOpResult | beginResult () const noexcept |
| QRhi::FrameOpResult | endResult () const noexcept |
| bool | deviceLost () const noexcept |
| QRhi::FrameOpResult | end () noexcept |
Static Public Attributes | |
| static std::atomic_bool | simulateDeviceLost {false} |
| Test seam: while set, every new frame fails to begin with FrameOpDeviceLost without touching the QRhi. | |
The documentation for this struct was generated from the following file: