pub fn new() -> GlRenderer {
        let simple_vertex                       = String::from_utf8(include_bytes!["../../shaders/simple/simple.glslv"].to_vec()).unwrap();
        let simple_fragment                     = String::from_utf8(include_bytes!["../../shaders/simple/simple.glslf"].to_vec()).unwrap();
        let dashed_line_fragment                = String::from_utf8(include_bytes!["../../shaders/dashed_line/dashed_line.glslf"].to_vec()).unwrap();
        let texture_vertex                      = String::from_utf8(include_bytes!["../../shaders/texture/texture.glslv"].to_vec()).unwrap();
        let texture_fragment                    = String::from_utf8(include_bytes!["../../shaders/texture/texture.glslf"].to_vec()).unwrap();
        let gradient_vertex                     = String::from_utf8(include_bytes!["../../shaders/texture/gradient.glslv"].to_vec()).unwrap();
        let gradient_fragment                   = String::from_utf8(include_bytes!["../../shaders/texture/gradient.glslf"].to_vec()).unwrap();

        let simple_shader                       = ShaderCollection::new(&simple_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &simple_fragment, vec![]);
        let dashed_line_shader                  = ShaderCollection::new(&simple_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &dashed_line_fragment, vec![]);
        let texture_shader                      = ShaderCollection::new(&texture_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &texture_fragment, vec![]);
        let gradient_shader                     = ShaderCollection::new(&gradient_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &gradient_fragment, vec![]);

        GlRenderer {
            buffers:                        vec![],
            index_buffers:                  vec![],
            textures:                       vec![],
            default_render_target:          None,
            active_shader:                  None,
            transform_matrix:               None,
            render_targets:                 vec![],
            simple_shader:                  simple_shader,
            dashed_line_shader:             dashed_line_shader,
            texture_shader:                 texture_shader,
            gradient_shader:                gradient_shader
        }
    }
///
/// Creates a new renderer that will render to the specified device and factory
///
Creates a new renderer that will render to the specified device and factory
Creates a new renderer that will render to the specified device and factory
pub fn new() -> GlRenderer {
        let simple_vertex                       = String::from_utf8(include_bytes!["../../shaders/simple/simple.glslv"].to_vec()).unwrap();
        let simple_fragment                     = String::from_utf8(include_bytes!["../../shaders/simple/simple.glslf"].to_vec()).unwrap();
        let dashed_line_fragment                = String::from_utf8(include_bytes!["../../shaders/dashed_line/dashed_line.glslf"].to_vec()).unwrap();
        let texture_vertex                      = String::from_utf8(include_bytes!["../../shaders/texture/texture.glslv"].to_vec()).unwrap();
        let texture_fragment                    = String::from_utf8(include_bytes!["../../shaders/texture/texture.glslf"].to_vec()).unwrap();
        let gradient_vertex                     = String::from_utf8(include_bytes!["../../shaders/texture/gradient.glslv"].to_vec()).unwrap();
        let gradient_fragment                   = String::from_utf8(include_bytes!["../../shaders/texture/gradient.glslf"].to_vec()).unwrap();
        let simple_shader                       = ShaderCollection::new(&simple_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &simple_fragment, vec![]);
        let dashed_line_shader                  = ShaderCollection::new(&simple_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &dashed_line_fragment, vec![]);
        let texture_shader                      = ShaderCollection::new(&texture_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &texture_fragment, vec![]);
        let gradient_shader                     = ShaderCollection::new(&gradient_vertex, vec!["a_Pos", "a_Color", "a_TexCoord"], &gradient_fragment, vec![]);
        GlRenderer {
            buffers:                        vec![],
            index_buffers:                  vec![],
            textures:                       vec![],
            default_render_target:          None,
            active_shader:                  None,
            transform_matrix:               None,
            render_targets:                 vec![],
            simple_shader:                  simple_shader,
            dashed_line_shader:             dashed_line_shader,
            texture_shader:                 texture_shader,
            gradient_shader:                gradient_shader
        }
    }
pub fn new ( ) -> GlRenderer { let simple_vertex = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let simple_fragment = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let dashed_line_fragment = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let texture_vertex = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let texture_fragment = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let gradient_vertex = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let gradient_fragment = String :: from_utf8 ( include_bytes ! [ " " ] . to_vec ( ) ) . unwrap ( ) ; let simple_shader = ShaderCollection :: new ( & simple_vertex , vec ! [ " " " " " " ] , & simple_fragment , vec ! [ ] ) ; let dashed_line_shader = ShaderCollection :: new ( & simple_vertex , vec ! [ " " " " " " ] , & dashed_line_fragment , vec ! [ ] ) ; let texture_shader = ShaderCollection :: new ( & texture_vertex , vec ! [ " " " " " " ] , & texture_fragment , vec ! [ ] ) ; let gradient_shader = ShaderCollection :: new ( & gradient_vertex , vec ! [ " " " " " " ] , & gradient_fragment , vec ! [ ] ) ; GlRenderer { buffers : vec ! [ ] , index_buffers : vec ! [ ] , textures : vec ! [ ] , default_render_target : None , active_shader : None , transform_matrix : None , render_targets : vec ! [ ] , simple_shader : simple_shader , dashed_line_shader : dashed_line_shader , texture_shader : texture_shader , gradient_shader : gradient_shader } }
Creates a new renderer that will render to the specified device and factory
Creates a new renderer that will render to the specified device and factory