Skip to content

Commit

Permalink
Add some debug! logs to the glutin port
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Sep 20, 2019
1 parent 8e95efb commit a7ed8f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/glutin/headed_window.rs
Expand Up @@ -134,6 +134,7 @@ impl Window {
}

let context = unsafe {
debug!("Making window {:?} current", context.window().id());
context.make_current().expect("Couldn't make window current")
};

Expand Down Expand Up @@ -173,6 +174,7 @@ impl Window {

context.make_not_current();

debug!("Created window {:?}", context.window().id());
let window = Window {
gl_context: RefCell::new(context),
events_loop,
Expand Down Expand Up @@ -480,10 +482,12 @@ impl WindowPortsMethods for Window {

impl webxr::glwindow::GlWindow for Window {
fn make_current(&mut self) {
debug!("Making window {:?} current", self.gl_context.borrow().window().id());
self.gl_context.get_mut().make_current();
}

fn swap_buffers(&mut self) {
debug!("Swapping buffers on window {:?}", self.gl_context.borrow().window().id());
self.gl_context.get_mut().swap_buffers();
self.gl_context.get_mut().make_not_current();
}
Expand Down

0 comments on commit a7ed8f7

Please sign in to comment.