Rename crate folders to remove raidillon prefix

This commit is contained in:
reo 2025-08-17 21:14:59 +03:00
parent 176ea52ab0
commit 3458662cfc
29 changed files with 31 additions and 28 deletions

View file

@ -0,0 +1,39 @@
use raidillon_core::Scene;
use glium::Frame;
use crate::GliumAssetManager;
use indexmap::IndexMap;
use raidillon_assets::ModelManagerRef;
pub struct RenderingContext<'a> {
pub scene: &'a Scene,
pub target: &'a mut Frame,
pub asset_manager: ModelManagerRef,
}
/// The internal "rendering system" trait of glium_platform.
/// This is unrelated to the main System trait in core.
pub trait RenderingSystem {
fn render(&mut self, ctx: &mut RenderingContext);
fn compile_shaders(&mut self) {}
}
type SystemID = String;
pub struct RenderingSystemManager {
pub systems: IndexMap<SystemID, Box<dyn RenderingSystem>>,
}
impl RenderingSystemManager {
pub fn new() -> Self {
Self {
systems: IndexMap::default(),
}
}
pub fn add_system(&mut self, id: SystemID, system: Box<dyn RenderingSystem>) {
self.systems.insert(id, system);
}
pub fn remove_system(&mut self, id: SystemID) {
self.systems.shift_remove(&id);
}
}