From 8a2c86e282673edb472a6ea0221c1b1af2de1c04 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 24 May 2024 23:57:51 +0200 Subject: fix(engine): enable OpenGL debug context when debug feature is enabled --- engine/src/window.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/src/window.rs b/engine/src/window.rs index 294d9ed..b308539 100644 --- a/engine/src/window.rs +++ b/engine/src/window.rs @@ -203,7 +203,12 @@ impl Builder /// occurs. pub fn create(&self, size: Dimens, title: &str) -> Result { - let window = self.inner.create( + let builder = self.inner.clone().hint( + CreationHint::OpenGLDebugContext, + CreationHintValue::Bool(cfg!(feature = "debug")), + ); + + let window = builder.create( &WindowSize { width: size.width, height: size.height, -- cgit v1.2.3-18-g5258