summaryrefslogtreecommitdiff
path: root/engine/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-11-27 20:02:08 +0100
committerHampusM <hampus@hampusmat.com>2023-11-27 20:02:08 +0100
commitc230f5aaea3df46ae9a4d7c1c9761e55ef827b82 (patch)
tree9e429a33df6e12f4b2f9adf87d08dad2a0127756 /engine/src/lib.rs
parent935f35455ac2e3547cdd21cd4596538958a7217e (diff)
feat(engine): add lighting maps
Diffstat (limited to 'engine/src/lib.rs')
-rw-r--r--engine/src/lib.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs
index 30346ed..c4711f2 100644
--- a/engine/src/lib.rs
+++ b/engine/src/lib.rs
@@ -135,11 +135,13 @@ impl Engine
let window_size = self.window.size().map_err(Error::GetWindowSizeFailed)?;
- self.renderer.render(
- self.objects.values(),
- self.light_source.as_ref(),
- &window_size,
- );
+ self.renderer
+ .render(
+ self.objects.values(),
+ self.light_source.as_ref(),
+ &window_size,
+ )
+ .map_err(Error::RenderingFailed)?;
self.window
.swap_buffers()
@@ -234,4 +236,7 @@ pub enum Error
#[error("Failed to get cursor position")]
GetCursorPosFailed(#[source] glfw::Error),
+
+ #[error("Rendering failed")]
+ RenderingFailed(#[source] renderer::Error),
}