summaryrefslogtreecommitdiff
path: root/src/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/context.rs')
-rw-r--r--src/context.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/context.rs b/src/context.rs
index 2171053..9f0d4ad 100644
--- a/src/context.rs
+++ b/src/context.rs
@@ -216,4 +216,13 @@ impl Context {
self.gl.disable(glow::CULL_FACE);
}
}
+
+ pub fn check_error(&self) {
+ unsafe {
+ let err = self.gl.get_error();
+ if err != 0 {
+ log::warn!("gl error: {}", err);
+ }
+ }
+ }
}