Class scene_renderer_t

Nested Relationships

Nested Types

Class Documentation

class scene_renderer_t

Scene renderer, handles rendering loop.

Public Types

using interrupt_t = std::unique_ptr<scene::interrupts::interrupt_t>

Public Functions

scene_renderer_t(const scene_t &scene, const wt_context_t &ctx, const ads::ads_t &ads, std::launch launch_mode = std::launch::async, scene::render_opts_t render_opts = {})

Queues rendering. Rendering is launched based on the launch policy launch_policy: asynchronously or deferred. With deferred policy, rendering starts only when get() is called.

inline auto get()

Retrieves rendering results. This is a blocking operation.

inline void wait()

Waits for rendering to complete. This is a blocking operation.

template<typename Rep, typename Period>
inline auto wait_for(const std::chrono::duration<Rep, Period> &wait_duration)

Waits for rendering to complete. This is a blocking operation. When wait_duration is 0, no blocking occurs and rendering state is returned.

Parameters:

wait_duration – maximal time to wait.

Returns:

std::future_status

inline void interrupt(interrupt_t intr)

Queues an interrupt. See wt::scene::interrupts. (Thread safe).

scene::rendering_status_t rendering_status() const noexcept

Queries the rendering status. Thread safe, returned results might be stale.