Implement Engine, add compile_shader to rendering systems
- Implement the initial version of the run method of the glium platform - Add asset manager to the context of the renderer. I will probably move that to either the engine or somewhere else later. - Other unimportant stuff that I'm too lazy to include here. Early stage commit messages don't really matter anyways.
This commit is contained in:
parent
e817abf8ab
commit
1cc63a0dab
7 changed files with 32 additions and 6 deletions
|
|
@ -1,16 +1,20 @@
|
|||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use raidillon_core::Scene;
|
||||
use glium::Surface;
|
||||
use crate::GliumAssetManager;
|
||||
|
||||
pub struct RenderingContext<'a, S: Surface> {
|
||||
pub scene: &'a mut Scene,
|
||||
pub target: &'a mut S,
|
||||
pub asset_manager: Arc<RwLock<GliumAssetManager>>,
|
||||
}
|
||||
|
||||
/// The internal "rendering system" trait of raidillon_glium.
|
||||
/// This is unrelated to the main System trait in raidillon_core.
|
||||
pub trait RenderingSystem {
|
||||
fn render<S: Surface>(ctx: &mut RenderingContext<S>);
|
||||
fn compile_shaders() {}
|
||||
}
|
||||
|
||||
type SystemID = String;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue