Skip to content

Engine → Renderer → render_scene.h

render_scene_pair

Syntax

class CONJURE_API render_scene_pair

Constructors

AccessSignatureDescription
publicrender_scene_pair();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
public~render_scene_pair();

Variables

AccessNameTypeDefaultDescription
privatemExtractingboolfalse
privatemOwnerstd::thread::id{}
privatemScenesstd::array<render_scene, 2>{}
privatemWriteIndexu320

Functions

Public

begin_extract

[[nodiscard]] render_scene &begin_extract();

Clears the write slot and returns it. Asserts when extraction is already open.

end_extract

void end_extract();

Swaps the slots; what was written becomes read(). Asserts without a matching begin_extract.

is_extracting

[[nodiscard]] bool is_extracting() const noexcept;

read

[[nodiscard]] const render_scene &read() const noexcept;

The slot the renderer reads. Stable between end_extract calls.

write

[[nodiscard]] render_scene &write() noexcept;

The slot extraction writes (valid between begin_extract and end_extract).

write_index

[[nodiscard]] u32 write_index() const noexcept;

Index of the write slot (0 or 1); flips on every end_extract.