pub struct GraphicsSystem { /* private fields */ }Expand description
Drives the render backend: builds it at init, submits a frame per step.
Implementations§
Source§impl GraphicsSystem
impl GraphicsSystem
Sourcepub fn new() -> Self
pub fn new() -> Self
Fresh renderer driver with no backend yet. Config (frames-in-flight,
clear color, max_frames, shadow-map size) is read from the world’s
GraphicsConfig in System::init.
Source§impl GraphicsSystem
impl GraphicsSystem
Sourcepub fn hot_reload_apply_parts<'a>(
&'a mut self,
backend: &'a mut dyn RenderBackend,
) -> HotReloadApplyParts<'a>
pub fn hot_reload_apply_parts<'a>( &'a mut self, backend: &'a mut dyn RenderBackend, ) -> HotReloadApplyParts<'a>
Disjoint mutable screen of the backend + hot-reload bookkeeping the
binary-only DebugHook::tick reload drive applies changes through. The
caller supplies the backend (borrowed from the world’s parked slot via
World::systems_and_render_backend) since this system yields it after
init. The library never calls this (the asset hot-reload drive lives in
the cn debug binary), so it reads as dead code under
cargo check --lib.
Sourcepub fn take_hot_reload_sources(&mut self) -> Option<HotReloadSources>
pub fn take_hot_reload_sources(&mut self) -> Option<HotReloadSources>
Take the init-captured hot-reload source catalogues, leaving None
behind. The cn debug drive calls this once on its first tick to build
the filesystem watcher + AssetHotReloadState. None under cn run,
or when no file-backed asset / world.jsonl was declared.
Trait Implementations§
Source§impl Debug for GraphicsSystem
impl Debug for GraphicsSystem
Source§impl Default for GraphicsSystem
impl Default for GraphicsSystem
Source§impl System for GraphicsSystem
impl System for GraphicsSystem
Source§fn init(&mut self, ctx: &mut PipelineContext<'_>)
fn init(&mut self, ctx: &mut PipelineContext<'_>)
World::start, before the first step.Source§fn step(&mut self, ctx: &mut PipelineContext<'_>) -> StepResult
fn step(&mut self, ctx: &mut PipelineContext<'_>) -> StepResult
Source§fn access(&self) -> Access
fn access(&self) -> Access
step may touch, consulted once when the schedule is built
(after init, so a data-dependent system can compute it from its
compiled state). The default claims everything: an undeclared system is
ordered against all others and never runs concurrently, which is always
safe. Declaring narrower access is what admits a system to shared waves
and to debug-build access validation.Auto Trait Implementations§
impl !Freeze for GraphicsSystem
impl !RefUnwindSafe for GraphicsSystem
impl !Sync for GraphicsSystem
impl !UnwindSafe for GraphicsSystem
impl Send for GraphicsSystem
impl Unpin for GraphicsSystem
impl UnsafeUnpin for GraphicsSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().