Skip to main content

RenderAgent

Struct RenderAgent 

Source
pub struct RenderAgent { /* private fields */ }
Expand description

The agent responsible for the main render pass (LaneKind::Render).

Holds only its own strategy state — every other dependency (GraphicsDevice, RenderSystem, GpuCache, RenderWorldStore, FrameContext) is fetched from EngineContext::services per frame.

Trait Implementations§

Source§

impl Agent for RenderAgent

Source§

fn access(&self) -> AgentAccess

Reads the world read-only (active-camera extraction) and writes shared render resources (RenderSystem, FrameGraph), so it takes the world by shared reference. The scheduler may run it concurrently with Isolated agents (which touch disjoint state), never with another shared-resource writer in the same wave.

Source§

fn deck_writes(&self) -> Vec<TypeId>

Buffers its main scene pass into the [ScenePassSlot] deck slot.

Source§

fn id(&self) -> AgentId

Returns the unique identifier for this agent.
Source§

fn negotiate(&mut self, request: NegotiationRequest) -> NegotiationResponse

Negotiates with the DCC to determine the best execution strategy given the current global resource constraints and priorities.
Source§

fn apply_budget(&mut self, budget: ResourceBudget)

Applies a resource budget issued by the DCC. The agent must adjust its internal logic (e.g., LOD, quality settings) to stay within the allocated limits.
Source§

fn on_initialize(&mut self, context: &mut EngineContext<'_>)

Called once after the agent is registered with the DCC. Read more
Source§

fn execute(&mut self, context: &mut EngineContext<'_>)

Called every frame by the engine loop. Read more
Source§

fn report_status(&self) -> AgentStatus

Reports the current status and health of the agent.
Source§

fn as_any(&self) -> &dyn Any

Allows downcasting to concrete agent types.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Allows mutable downcasting to concrete agent types.
Source§

fn execution_timing(&self) -> ExecutionTiming

Declares WHEN and HOW this agent should execute within the frame pipeline. Read more
Source§

impl Default for RenderAgent

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AppLifecycle for T
where T: ?Sized,

§

fn on_start(&mut self, ctx: &mut dyn AppContext)

Called once after the backend is up but before the first update. Apps install their theme / fonts here.
§

fn on_exit(&mut self)

Called once when the window is closing. Persist state here.
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to the inner value as &dyn Any.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.