wip: engine enhancements and fixes

This commit is contained in:
reo 2025-08-24 18:49:41 +03:00
parent 9816f14f53
commit cc7921a5fe
27 changed files with 347 additions and 32 deletions

View file

@ -1,8 +1,11 @@
use std::cell::RefCell;
use std::rc::Rc;
use raidillon_core::Scene;
use glium::Frame;
use crate::GliumAssetManager;
use glium::{Display, Frame};
use glium::glutin::surface::WindowSurface;
use indexmap::IndexMap;
use raidillon_assets::ModelManagerRef;
use crate::GliumAssetManager;
pub struct RenderingContext<'a> {
pub scene: &'a Scene,
@ -14,10 +17,10 @@ pub struct RenderingContext<'a> {
/// 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) {}
fn initialize(display: &Display<WindowSurface>) -> Self where Self: Sized;
}
type SystemID = String;
pub type SystemID = &'static str;
pub struct RenderingSystemManager {
pub systems: IndexMap<SystemID, Box<dyn RenderingSystem>>,