rust/lib-hedgewars-engine/src/lib.rs
changeset 14726 19122a329774
parent 14725 12db7e435ea6
child 14727 88b0efba77b9
equal deleted inserted replaced
14725:12db7e435ea6 14726:19122a329774
     8     io::{Read, Write},
     8     io::{Read, Write},
     9     mem::replace,
     9     mem::replace,
    10     os::raw::{c_char, c_void},
    10     os::raw::{c_char, c_void},
    11 };
    11 };
    12 
    12 
    13 use self::instance::{EngineInstance};
    13 use self::instance::EngineInstance;
    14 
    14 
    15 #[repr(C)]
    15 #[repr(C)]
    16 #[derive(Copy, Clone)]
    16 #[derive(Copy, Clone)]
    17 pub struct PreviewInfo {
    17 pub struct PreviewInfo {
    18     width: u32,
    18     width: u32,
    79     engine_state: &mut EngineInstance,
    79     engine_state: &mut EngineInstance,
    80     width: u16,
    80     width: u16,
    81     height: u16,
    81     height: u16,
    82     gl_loader: extern "C" fn(*const c_char) -> *const c_void,
    82     gl_loader: extern "C" fn(*const c_char) -> *const c_void,
    83 ) {
    83 ) {
       
    84     engine_state.world.create_renderer(width, height);
    84 }
    85 }
    85 
    86 
    86 #[no_mangle]
    87 #[no_mangle]
    87 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) {
    88 pub extern "C" fn render_frame(engine_state: &mut EngineInstance) {
    88     //engine_state.render()
    89     //engine_state.render()