Class FrameWriter
Defined in File render-frame.h
Class Documentation
-
class FrameWriter
Declaration:
finalWrites into a free slot after update().
Camera matrices are copied once per pass; draw packets are constructed in the slot’s retained vector storage. Caller excludes other writers/readers and retains the frame. Construction rejects unrecycled active passes. Destruction does not publish or roll back; a preparation failure requires recycling the partial frame before reuse.
Public Functions
-
inline explicit FrameWriter(::CE::Rendering::Frame &frame)
Borrow one free slot for exclusive CPU preparation.
- Parameters:
frame – Live frame excluded from all other readers/writers.
- Throws:
CE::Exceptions::failed_operation – If active passes have not been recycled. Destruction neither publishes nor rolls back preparation; after a failed preparation recycle the partial frame before reuse.
-
inline void reserve_passes(std::size_t count)
Reserve outer pass capacity before preparing draws.
- Parameters:
count – Desired pass capacity. Growth invalidates borrowed pass references/spans, while PassWriter indices remain usable. Allocation/length failures propagate; no synchronization/publication occurs.
-
inline ::CE::Rendering::PassWriter begin_pass(const glm::mat4 &projection, const glm::mat4 &view, ::CE::Rendering::Pipelines::PassConstraints2D constraints = ::CE::Rendering::Pipelines::PassConstraints2D{}, ::CE::Rendering::Parameters::Set parameters = ::CE::Rendering::Parameters::Set{})
Declaration:
[[nodiscard]]Append an active pass, copying matrices and owning parameter/constraint values.
See also
- Parameters:
projection – Projection copied into pass semantics.
view – World-to-view matrix copied into pass semantics.
constraints – Fixed-state requirements checked against submitted pipelines.
parameters – Owned lower-priority custom parameter layer.
- Returns:
Writer borrowing the new pass through this preparation phase, before recycle/publication. Allocation failures propagate; no backend call or cross-thread publication occurs.
-
inline explicit FrameWriter(::CE::Rendering::Frame &frame)