summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-24 23:57:51 +0200
committerHampusM <hampus@hampusmat.com>2024-05-24 23:57:51 +0200
commit8a2c86e282673edb472a6ea0221c1b1af2de1c04 (patch)
tree3201e453eeba5e32a6d5f9130eade1e90c34648d
parentc55e68872043d01f0d8e3fc9dae916a7a48dba62 (diff)
fix(engine): enable OpenGL debug context when debug feature is enabled
-rw-r--r--engine/src/window.rs7
1 files changed, 6 insertions, 1 deletions
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<u32>, title: &str) -> Result<Window, Error>
{
- 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,