wip
This commit is contained in:
parent
cc7921a5fe
commit
3692736a61
22 changed files with 447 additions and 44 deletions
|
|
@ -1,11 +1,16 @@
|
|||
use glam::Vec3;
|
||||
use std::path::Path;
|
||||
use glam::{Quat, Vec3};
|
||||
use raidillon_core::{Engine, Scene, System};
|
||||
use raidillon_core::system::SystemContext;
|
||||
use raidillon_platform::{Platform, Camera};
|
||||
|
||||
use raidillon_assets::model_path;
|
||||
use raidillon_ecs::components::ModelHandle;
|
||||
use raidillon_ecs::Transform;
|
||||
#[cfg(feature = "glium")]
|
||||
use raidillon_glium::GliumPlatform;
|
||||
|
||||
const TEST_GLTF: &str = "pink-monkey.gltf";
|
||||
|
||||
const RENDERING_TEST_SYSTEM: &str = "rendering_test_system";
|
||||
struct RenderingTestSystem;
|
||||
|
||||
|
|
@ -17,12 +22,23 @@ impl System for RenderingTestSystem {
|
|||
center: Vec3::ZERO,
|
||||
up: Vec3::Y,
|
||||
fovy: 60_f32.to_radians(),
|
||||
aspect: 1920 as f32 / 1080 as f32, // FIXME
|
||||
aspect: ctx.platform_context.frame_width / ctx.platform_context.frame_height,
|
||||
znear: 0.1,
|
||||
zfar: 100.0,
|
||||
},));
|
||||
|
||||
// TODO: Load a sample glTF file
|
||||
let mut am = ctx.platform_context.asset_manager.borrow_mut();
|
||||
|
||||
am.load_gltf(TEST_GLTF, &model_path(TEST_GLTF));
|
||||
|
||||
ctx.scene.world.spawn((
|
||||
Transform {
|
||||
translation: Vec3::new(0.0, 0.0, 0.0),
|
||||
rotation: Quat::IDENTITY,
|
||||
scale: Vec3::new(1.0, 1.0, 1.0),
|
||||
},
|
||||
ModelHandle(TEST_GLTF),
|
||||
));
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &mut SystemContext) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue