summaryrefslogtreecommitdiff
path: root/engine/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-10-17 20:37:19 +0200
committerHampusM <hampus@hampusmat.com>2023-10-17 20:37:19 +0200
commit30394c16ccdcdb145352e245a7a8893cef28e82d (patch)
treef847effd099d949fa170ab7b48ec0229713718da /engine/src/lib.rs
parent6e49565a62ec6e675525646217578cf52413bd92 (diff)
fix(engine): drop objects before window to call valid GL functions
Diffstat (limited to 'engine/src/lib.rs')
-rw-r--r--engine/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs
index 9d836c0..db6ab94 100644
--- a/engine/src/lib.rs
+++ b/engine/src/lib.rs
@@ -20,8 +20,9 @@ pub use glfw::WindowSize;
#[derive(Debug)]
pub struct Engine
{
- window: Window,
+ /// Objects have to be dropped before window. Otherwise, UB.
objects: BTreeMap<ObjectId, Object>,
+ window: Window,
}
impl Engine