summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-02-18 19:18:18 +0100
committerHampusM <hampus@hampusmat.com>2024-02-18 19:18:18 +0100
commite8c6c096b2068f4ea71b021bf02f56d266ed671c (patch)
tree0cc54c1c82bf7af9881da00fa4d1a882a8263fd1
parent12e0f5ffffcaa36cce3cd4fecc007b9a2955ff23 (diff)
refactor(engine): move data types to a data types module
-rw-r--r--engine/src/data_types.rs4
-rw-r--r--engine/src/data_types/color.rs (renamed from engine/src/color.rs)0
-rw-r--r--engine/src/data_types/matrix.rs (renamed from engine/src/matrix.rs)0
-rw-r--r--engine/src/data_types/vector.rs (renamed from engine/src/vector.rs)0
-rw-r--r--engine/src/lib.rs7
5 files changed, 8 insertions, 3 deletions
diff --git a/engine/src/data_types.rs b/engine/src/data_types.rs
new file mode 100644
index 0000000..01d0a1e
--- /dev/null
+++ b/engine/src/data_types.rs
@@ -0,0 +1,4 @@
+pub mod color;
+pub mod vector;
+
+pub(crate) mod matrix;
diff --git a/engine/src/color.rs b/engine/src/data_types/color.rs
index 697ea8b..697ea8b 100644
--- a/engine/src/color.rs
+++ b/engine/src/data_types/color.rs
diff --git a/engine/src/matrix.rs b/engine/src/data_types/matrix.rs
index 85a3721..85a3721 100644
--- a/engine/src/matrix.rs
+++ b/engine/src/data_types/matrix.rs
diff --git a/engine/src/vector.rs b/engine/src/data_types/vector.rs
index 5b7779c..5b7779c 100644
--- a/engine/src/vector.rs
+++ b/engine/src/data_types/vector.rs
diff --git a/engine/src/lib.rs b/engine/src/lib.rs
index fdd79a4..fada83f 100644
--- a/engine/src/lib.rs
+++ b/engine/src/lib.rs
@@ -12,7 +12,6 @@ use crate::object::{Id as ObjectId, Object};
use crate::renderer::Renderer;
use crate::vector::Vec2;
-mod matrix;
mod opengl;
mod projection;
mod renderer;
@@ -20,19 +19,21 @@ mod shader_preprocessor;
mod transform;
pub mod camera;
-pub mod color;
+pub mod data_types;
pub mod lighting;
pub mod material;
pub mod math;
pub mod mesh;
pub mod object;
pub mod texture;
-pub mod vector;
pub mod vertex;
pub use glfw::window::Key;
pub use glfw::WindowSize;
+pub(crate) use crate::data_types::matrix;
+pub use crate::data_types::{color, vector};
+
#[derive(Debug)]
pub struct Engine<CameraT>
{