summaryrefslogtreecommitdiff
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-09-25 23:12:41 -0400
committerMicha White <botahamec@outlook.com>2022-09-25 23:12:41 -0400
commit374c97ca348bb1d8df4cb125a9e68b855365daf5 (patch)
treeb17ef27cd085c0d4fbc094bf500b7459ebcae64d /src/renderer.rs
parent20815949e86e82a97529432d8a6d1e425354afaa (diff)
Public API for rotating the camera
Diffstat (limited to 'src/renderer.rs')
-rw-r--r--src/renderer.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 4ac521f..55333f4 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -342,6 +342,16 @@ impl Renderer {
self.instances.clear();
}
+ /// Get the camera information
+ pub const fn camera(&self) -> &Camera {
+ &self.camera
+ }
+
+ /// Get a mutable reference to the camera
+ pub fn camera_mut(&mut self) -> &mut Camera {
+ &mut self.camera
+ }
+
fn refresh_camera_buffer(&mut self) {
self.queue.write_buffer(
&self.camera_buffer,