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.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs
index 407df32..dc76b37 100644
--- a/engine/src/lib.rs
+++ b/engine/src/lib.rs
@@ -29,7 +29,13 @@ impl Engine
/// Will return `Err` if window creation or window configuration fails.
pub fn new(window_size: &WindowSize, window_title: &str) -> Result<Self, Error>
{
- let window = WindowBuilder::new()
+ let window_builder = WindowBuilder::new();
+
+ #[cfg(feature = "debug")]
+ let window_builder =
+ window_builder.hint(glfw::window::Hint::OpenGLDebugContext, 1);
+
+ let window = window_builder
.create(window_size, window_title)
.map_err(Error::CreateWindowFailed)?;