Rename crate folders to remove raidillon prefix
This commit is contained in:
parent
176ea52ab0
commit
3458662cfc
29 changed files with 31 additions and 28 deletions
|
|
@ -1,39 +0,0 @@
|
|||
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 raidillon_glium.
|
||||
/// This is unrelated to the main System trait in raidillon_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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue