From 230024ac638cf689d1c45be4bb3c79bdcaca8115 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 24 Apr 2023 09:28:33 +0100 Subject: [PATCH] Move app and camera to core module --- src/core.rs | 4 ++++ src/{ => core}/app.rs | 5 +++-- src/{ => core}/camera.rs | 0 src/main.rs | 4 +--- 4 files changed, 8 insertions(+), 5 deletions(-) rename src/{ => core}/app.rs (98%) rename src/{ => core}/camera.rs (100%) diff --git a/src/core.rs b/src/core.rs index e69de29..be6c0d2 100644 --- a/src/core.rs +++ b/src/core.rs @@ -0,0 +1,4 @@ +mod app; +mod camera; + +pub use self::{app::App, camera::*}; diff --git a/src/app.rs b/src/core/app.rs similarity index 98% rename from src/app.rs rename to src/core/app.rs index 00d3aaa..b590e29 100644 --- a/src/app.rs +++ b/src/core/app.rs @@ -5,9 +5,10 @@ use winit::{ event_loop::{ControlFlow, EventLoop}, }; -use crate::{camera, render}; +use super::camera; +use crate::render; -pub(crate) struct App { +pub struct App { window: winit::window::Window, event_loop: EventLoop<()>, render_ctx: render::Context, diff --git a/src/camera.rs b/src/core/camera.rs similarity index 100% rename from src/camera.rs rename to src/core/camera.rs diff --git a/src/main.rs b/src/main.rs index 1c2526b..9459ea1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,7 @@ -mod app; -mod camera; mod core; mod render; fn main() { env_logger::init(); - pollster::block_on(app::App::new(1280, 720, "Epic")).run(); + pollster::block_on(core::App::new(1280, 720, "Epic")).run(); }