pub fn with_device(device: &metal::Device, flip_y: bool) -> MetalRenderer {
        let device          = device.clone();
        let command_queue   = device.new_command_queue();
        let shader_library  = device.new_library_with_data(include_bytes![concat!(env!("OUT_DIR"), "/flo.metallib")]).unwrap();

        MetalRenderer {
            device:             device,
            flip_y:             flip_y,
            command_queue:      command_queue,
            vertex_buffers:     vec![],
            index_buffers:      vec![],
            render_targets:     vec![],
            textures:           vec![],
            shader_library:     shader_library,
            pipeline_states:    HashMap::new()
        }
    }
///
/// Creates a new metal renderer using the system default device
///
Creates a new metal renderer using the system default device
Creates a new metal renderer using the system default device
pub fn with_device(device: &metal::Device, flip_y: bool) -> MetalRenderer {
        let device          = device.clone();
        let command_queue   = device.new_command_queue();
        let shader_library  = device.new_library_with_data(include_bytes![concat!(env!("OUT_DIR"), "/flo.metallib")]).unwrap();
        MetalRenderer {
            device:             device,
            flip_y:             flip_y,
            command_queue:      command_queue,
            vertex_buffers:     vec![],
            index_buffers:      vec![],
            render_targets:     vec![],
            textures:           vec![],
            shader_library:     shader_library,
            pipeline_states:    HashMap::new()
        }
    }
pub fn with_device ( device : & metal :: Device , flip_y : bool ) -> MetalRenderer { let device = device . clone ( ) ; let command_queue = device . new_command_queue ( ) ; let shader_library = device . new_library_with_data ( include_bytes ! [ concat ( env ( " " ) " " ) ] ) . unwrap ( ) ; MetalRenderer { device : device , flip_y : flip_y , command_queue : command_queue , vertex_buffers : vec ! [ ] , index_buffers : vec ! [ ] , render_targets : vec ! [ ] , textures : vec ! [ ] , shader_library : shader_library , pipeline_states : HashMap :: new ( ) } }
Creates a new metal renderer using the system default device
Creates a new metal renderer using the system default device
device
&metal::Device
flip_y
bool