pub fn new_from_files( gl:Rc<glow::Context>, vx_shader_path:&str, fg_shader_path:&str )-> Self {

        let vx_shader = std::fs::read_to_string(vx_shader_path).expect(format!("Failed to read file: {}",vx_shader_path).as_str());
        let fg_shader = std::fs::read_to_string(fg_shader_path).expect(format!("Failed to read file: {}",fg_shader_path).as_str());

        Shader::new_from_strings(gl, vx_shader.as_str(), fg_shader.as_str())
    }
/// Create new shader form two files
/// ------------------------------------------------------------------------
Create new shader form two files
Create new shader form two files
pub fn new_from_files( gl:Rc<glow::Context>, vx_shader_path:&str, fg_shader_path:&str )-> Self {
        let vx_shader = std::fs::read_to_string(vx_shader_path).expect(format!("Failed to read file: {}",vx_shader_path).as_str());
        let fg_shader = std::fs::read_to_string(fg_shader_path).expect(format!("Failed to read file: {}",fg_shader_path).as_str());
        Shader::new_from_strings(gl, vx_shader.as_str(), fg_shader.as_str())
    }
pub fn new_from_files ( gl : Rc < glow :: Context > , vx_shader_path : & str , fg_shader_path : & str ) -> Self { let vx_shader = std :: fs :: read_to_string ( vx_shader_path ) . expect ( format ! ( " " vx_shader_path ) . as_str ( ) ) ; let fg_shader = std :: fs :: read_to_string ( fg_shader_path ) . expect ( format ! ( " " fg_shader_path ) . as_str ( ) ) ; Shader :: new_from_strings ( gl , vx_shader . as_str ( ) , fg_shader . as_str ( ) ) }
Create new shader form two files
Create new shader form two files
gl
Rc<glow::Context>
vx_shader_path
&str
fg_shader_path
&str