summaryrefslogtreecommitdiff
path: root/engine/src/lib.rs
diff options
context:
space:
mode:
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),
}