Skip to content

Instantly share code, notes, and snippets.

@w1th0utnam3
Created March 13, 2020 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save w1th0utnam3/b7cbd5f33d831775af82ddba06abdb56 to your computer and use it in GitHub Desktop.
Save w1th0utnam3/b7cbd5f33d831775af82ddba06abdb56 to your computer and use it in GitHub Desktop.
Glium 0.23.0 bug: thread 'main' panicked at 'already mutably borrowed: BorrowError'
use glutin::event_loop::{ControlFlow, EventLoop};
use glutin::window::WindowBuilder;
fn main() {
let el = EventLoop::new();
let wb = WindowBuilder::new();
let windowed_context = glutin::ContextBuilder::new()
.build_windowed(wb, &el)
.unwrap();
let windowed_context = unsafe { windowed_context.make_current().unwrap() };
el.run(move |_, _, control_flow| {
windowed_context.window().set_maximized(true);
*control_flow = ControlFlow::Exit;
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment