Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::render::GpuTarget Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ GpuTarget()

pulp::render::GpuTarget::GpuTarget ( )
default

Member Function Documentation

◆ color()

GpuTexture pulp::render::GpuTarget::color ( ) const

◆ depth()

std::optional< GpuTexture > pulp::render::GpuTarget::depth ( ) const

◆ height()

std::uint32_t pulp::render::GpuTarget::height ( ) const
noexcept

◆ read_pixels()

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.

◆ valid()

bool pulp::render::GpuTarget::valid ( ) const
noexcept

◆ width()

std::uint32_t pulp::render::GpuTarget::width ( ) const
noexcept

◆ detail::GpuAccess

friend struct detail::GpuAccess
friend

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/render/include/pulp/render/gpu_pass.hpp