Offscreen color target (and optional depth) with CPU readback. More...
#include <gpu_pass.hpp>
Public Member Functions | |
| GpuTarget ()=default | |
| bool | valid () const noexcept |
| std::uint32_t | width () const noexcept |
| std::uint32_t | height () const noexcept |
| GpuTexture | color () const |
| std::optional< GpuTexture > | depth () const |
| GpuResult< GpuPixels > | read_pixels (std::chrono::milliseconds timeout=std::chrono::milliseconds(2000)) const |
| Copy the color texture to the CPU and wait for it (blocking, not for the audio thread). | |
Friends | |
| struct | detail::GpuAccess |
Offscreen color target (and optional depth) with CPU readback.
The color texture is a render target, sampled and copy-source, so it can be drawn into, composited with draw_gpu_texture() and read back.
|
default |
| GpuTexture pulp::render::GpuTarget::color | ( | ) | const |
| std::optional< GpuTexture > pulp::render::GpuTarget::depth | ( | ) | const |
|
noexcept |
| GpuResult< GpuPixels > pulp::render::GpuTarget::read_pixels | ( | std::chrono::milliseconds | timeout = std::chrono::milliseconds(2000) | ) | const |
Copy the color texture to the CPU and wait for it (blocking, not for the audio thread).
Submit the frame that drew the target first; work submitted earlier on the queue is complete when this returns.
|
noexcept |
|
noexcept |
|
friend |