pub struct RenderBridgeState {Show 48 fields
pub sprite_commands: Vec<SpriteCommand>,
pub camera_x: f32,
pub camera_y: f32,
pub camera_zoom: f32,
pub delta_time: f64,
pub keys_down: HashSet<String>,
pub keys_pressed: HashSet<String>,
pub mouse_x: f32,
pub mouse_y: f32,
pub texture_load_queue: Vec<(String, u32)>,
pub base_dir: PathBuf,
pub next_texture_id: u32,
pub texture_path_to_id: HashMap<String, u32>,
pub tilemaps: TilemapStore,
pub ambient_light: [f32; 3],
pub point_lights: Vec<PointLight>,
pub audio_commands: Vec<BridgeAudioCommand>,
pub next_sound_id: u32,
pub sound_path_to_id: HashMap<String, u32>,
pub font_texture_queue: Vec<u32>,
pub viewport_width: f32,
pub viewport_height: f32,
pub scale_factor: f32,
pub clear_color: [f32; 4],
pub save_dir: PathBuf,
pub shader_create_queue: Vec<(u32, String, String)>,
pub shader_param_queue: Vec<(u32, u32, [f32; 4])>,
pub next_shader_id: u32,
pub effect_create_queue: Vec<(u32, String)>,
pub effect_param_queue: Vec<(u32, u32, [f32; 4])>,
pub effect_remove_queue: Vec<u32>,
pub effect_clear: bool,
pub next_effect_id: u32,
pub camera_bounds: Option<CameraBounds>,
pub gi_enabled: bool,
pub gi_intensity: f32,
pub gi_probe_spacing: Option<f32>,
pub gi_interval: Option<f32>,
pub gi_cascade_count: Option<u32>,
pub emissives: Vec<[f32; 8]>,
pub occluders: Vec<[f32; 4]>,
pub directional_lights: Vec<[f32; 5]>,
pub spot_lights: Vec<[f32; 9]>,
pub msdf_fonts: MsdfFontStore,
pub msdf_builtin_queue: Vec<(u32, u32)>,
pub msdf_shader_queue: Vec<(u32, String)>,
pub msdf_shader_pool: Vec<u32>,
pub msdf_texture_load_queue: Vec<(String, u32)>,
}Expand description
Shared state between render ops and the main loop.
This is placed into OpState when running in renderer mode.
Fields§
§sprite_commands: Vec<SpriteCommand>§camera_x: f32§camera_y: f32§camera_zoom: f32§delta_time: f64§keys_down: HashSet<String>Input state snapshot (updated each frame by the event loop).
keys_pressed: HashSet<String>§mouse_x: f32§mouse_y: f32§texture_load_queue: Vec<(String, u32)>Pending texture load requests (path → result channel).
base_dir: PathBufBase directory for resolving relative texture paths.
next_texture_id: u32Next texture ID to assign (for pre-registration before GPU load).
texture_path_to_id: HashMap<String, u32>Map of path → already-assigned texture ID.
tilemaps: TilemapStoreTilemap storage (managed by tilemap ops).
ambient_light: [f32; 3]Lighting: ambient color (0-1 per channel). Default white = no darkening.
point_lights: Vec<PointLight>Lighting: point lights for this frame.
audio_commands: Vec<BridgeAudioCommand>Audio commands queued by TS, drained each frame.
next_sound_id: u32Next sound ID to assign.
sound_path_to_id: HashMap<String, u32>Map of sound path → assigned sound ID.
font_texture_queue: Vec<u32>Font texture creation queue (texture IDs to create as built-in font).
viewport_width: f32Current viewport dimensions in logical pixels (synced from renderer each frame).
viewport_height: f32§scale_factor: f32Display scale factor (e.g. 2.0 on Retina).
clear_color: [f32; 4]Clear/background color [r, g, b, a] in 0.0-1.0 range.
save_dir: PathBufDirectory for save files (.arcane/saves/ relative to game entry file).
shader_create_queue: Vec<(u32, String, String)>Custom shader creation queue: (id, name, wgsl_source).
shader_param_queue: Vec<(u32, u32, [f32; 4])>Custom shader param updates: (shader_id, index, [x, y, z, w]).
next_shader_id: u32Next shader ID to assign.
effect_create_queue: Vec<(u32, String)>Post-process effect creation queue: (id, effect_type_name).
effect_param_queue: Vec<(u32, u32, [f32; 4])>Post-process effect param updates: (effect_id, index, [x, y, z, w]).
effect_remove_queue: Vec<u32>Post-process effect removal queue.
effect_clear: boolFlag to clear all post-process effects.
next_effect_id: u32Next effect ID to assign.
camera_bounds: Option<CameraBounds>Camera bounds (world-space limits).
gi_enabled: boolWhether global illumination (radiance cascades) is enabled.
gi_intensity: f32GI intensity multiplier.
gi_probe_spacing: Option<f32>GI probe spacing override (None = default 8).
gi_interval: Option<f32>GI interval override (None = default 4).
gi_cascade_count: Option<u32>GI cascade count override (None = default 4).
emissives: Vec<[f32; 8]>Emissive surfaces for GI: (x, y, w, h, r, g, b, intensity).
occluders: Vec<[f32; 4]>Occluders for GI: (x, y, w, h).
directional_lights: Vec<[f32; 5]>Directional lights: (angle, r, g, b, intensity).
spot_lights: Vec<[f32; 9]>Spot lights: (x, y, angle, spread, range, r, g, b, intensity).
msdf_fonts: MsdfFontStoreMSDF font storage.
msdf_builtin_queue: Vec<(u32, u32)>Queue for creating built-in MSDF font: (font_id, texture_id).
msdf_shader_queue: Vec<(u32, String)>Queue for creating MSDF shader: (shader_id, wgsl_source).
msdf_shader_pool: Vec<u32>Pool of MSDF shader IDs (same WGSL, separate uniform buffers for per-draw-call params).
msdf_texture_load_queue: Vec<(String, u32)>Pending MSDF texture loads (needs linear sampling, not sRGB).
Implementations§
Trait Implementations§
Source§impl Clone for RenderBridgeState
impl Clone for RenderBridgeState
Source§fn clone(&self) -> RenderBridgeState
fn clone(&self) -> RenderBridgeState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RenderBridgeState
impl RefUnwindSafe for RenderBridgeState
impl Send for RenderBridgeState
impl Sync for RenderBridgeState
impl Unpin for RenderBridgeState
impl UnwindSafe for RenderBridgeState
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> PathsInErrorsExt for Twhere
T: ?Sized,
impl<T> PathsInErrorsExt for Twhere
T: ?Sized,
Source§fn with_paths_in_errors(&self) -> SysWithPathsInErrors<'_, Self>
fn with_paths_in_errors(&self) -> SysWithPathsInErrors<'_, Self>
self in a SysWithPathsInErrors that includes paths in error messages.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.