equal
deleted
inserted
replaced
83 ) { |
83 ) { |
84 gl::load_with(|name| { |
84 gl::load_with(|name| { |
85 let c_name = CString::new(name).unwrap(); |
85 let c_name = CString::new(name).unwrap(); |
86 gl_loader(c_name.as_ptr()) |
86 gl_loader(c_name.as_ptr()) |
87 }); |
87 }); |
88 unsafe { gl::Viewport(0, 0, width as i32, height as i32); } |
88 unsafe { |
|
89 gl::Viewport(0, 0, width as i32, height as i32); |
|
90 } |
89 engine_state.world.create_renderer(width, height); |
91 engine_state.world.create_renderer(width, height); |
90 } |
92 } |
91 |
93 |
92 #[no_mangle] |
94 #[no_mangle] |
93 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) { |
95 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) { |
94 //engine_state.render() |
96 engine_state.render() |
95 } |
97 } |
96 |
98 |
97 #[no_mangle] |
99 #[no_mangle] |
98 pub extern "C" fn advance_simulation(engine_state: &mut EngineInstance, ticks: u32) -> bool { |
100 pub extern "C" fn advance_simulation(engine_state: &mut EngineInstance, ticks: u32) -> bool { |
99 engine_state.world.step(); |
101 engine_state.world.step(); |