aboutsummaryrefslogtreecommitdiff
path: root/stockton-types
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:23 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:23 +0100
commit47a0c0317cc774c19b78582bec9b5b09d56f569a (patch)
treed03471ea4e084ace9b95a2c5b7febb780b45bb63 /stockton-types
parentfb996488aa651cb2e7f46abc083c4318b47e77cd (diff)
feat(render): draw passes
Diffstat (limited to 'stockton-types')
-rw-r--r--stockton-types/Cargo.toml1
-rw-r--r--stockton-types/src/components/mod.rs14
-rw-r--r--stockton-types/src/session.rs2
3 files changed, 15 insertions, 2 deletions
diff --git a/stockton-types/Cargo.toml b/stockton-types/Cargo.toml
index f473c5f..13f1014 100644
--- a/stockton-types/Cargo.toml
+++ b/stockton-types/Cargo.toml
@@ -7,4 +7,3 @@ edition = "2018"
[dependencies]
nalgebra-glm = "^0.6"
legion = { version = "^0.3" }
-stockton-levels = { path = "../stockton-levels" }
diff --git a/stockton-types/src/components/mod.rs b/stockton-types/src/components/mod.rs
index a90f5e8..421cf9c 100644
--- a/stockton-types/src/components/mod.rs
+++ b/stockton-types/src/components/mod.rs
@@ -59,3 +59,17 @@ pub struct CameraSettings {
/// Far clipping plane (world units)
pub far: f32,
}
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub struct CameraVPMatrix {
+ /// The camera's VP Matrix
+ pub vp_matrix: Mat4,
+}
+
+impl Default for CameraVPMatrix {
+ fn default() -> Self {
+ CameraVPMatrix {
+ vp_matrix: Mat4::identity(),
+ }
+ }
+}
diff --git a/stockton-types/src/session.rs b/stockton-types/src/session.rs
index 06779d3..f3d4e50 100644
--- a/stockton-types/src/session.rs
+++ b/stockton-types/src/session.rs
@@ -6,7 +6,7 @@ use legion::*;
/// A loaded world.
pub struct Session {
pub world: World,
- resources: Resources,
+ pub resources: Resources,
schedule: Schedule,
}