equal
deleted
inserted
replaced
60 CursorMove, |
60 CursorMove, |
61 CursorClick, |
61 CursorClick, |
62 } |
62 } |
63 |
63 |
64 #[no_mangle] |
64 #[no_mangle] |
65 pub extern "C" fn simple_event(engine_state: &mut EngineInstance, event_type: SimpleEventType) {} |
65 pub extern "C" fn simple_event(engine_state: &mut EngineInstance, event_type: SimpleEventType) { |
|
66 println!("{:?}", event_type); |
|
67 } |
66 |
68 |
67 #[no_mangle] |
69 #[no_mangle] |
68 pub extern "C" fn long_event( |
70 pub extern "C" fn long_event( |
69 engine_state: &mut EngineInstance, |
71 engine_state: &mut EngineInstance, |
70 event_type: LongEventType, |
72 event_type: LongEventType, |
150 }); |
152 }); |
151 unsafe { |
153 unsafe { |
152 gl::Viewport(0, 0, width as i32, height as i32); |
154 gl::Viewport(0, 0, width as i32, height as i32); |
153 } |
155 } |
154 engine_state.world.create_renderer(width, height); |
156 engine_state.world.create_renderer(width, height); |
|
157 engine_state.world.init_renderer(); |
155 } |
158 } |
156 |
159 |
157 #[no_mangle] |
160 #[no_mangle] |
158 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) { |
161 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) { |
159 engine_state.render() |
162 engine_state.render() |