Skip to content

Commit c32eaed

Browse files
committed
initialize GL FIRST
1 parent c8673ff commit c32eaed

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/app.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ pub struct App {
1515

1616
impl App {
1717
pub fn new() -> Self {
18-
let pm = projectm::create();
19-
2018
// setup sdl
2119
let sdl_context = sdl2::init().unwrap();
2220
let video_subsystem = sdl_context.video().unwrap();
@@ -49,15 +47,11 @@ impl App {
4947
window.gl_make_current(&gl_context).unwrap();
5048

5149
// initialize projectM
52-
let projectm_handle = projectm::create();
50+
let pm = projectm::create();
5351

5452
// get/set window size
5553
let (width, height) = window.drawable_size(); // highDPI aware
56-
projectm::set_window_size(
57-
projectm_handle,
58-
width.try_into().unwrap(),
59-
height.try_into().unwrap(),
60-
);
54+
projectm::set_window_size(pm, width.try_into().unwrap(), height.try_into().unwrap());
6155

6256
println!("projectm initialized!");
6357
Self {

0 commit comments

Comments
 (0)