pub fn compile_file(path: String, shader_type: ShaderType) 
        -> Result<GLuint, EngineError> {
    
    // Load the data and provide to compile_from_source
    let shader_data = fs::read_to_string(path).expect("Failed to load shader file.");
    compile_source(shader_data, shader_type)
}
/// Compiles a file into an OpenGL shader and returns the shader id.
///
/// This is mostly used as a helper for `program_from_*` which can be used
/// to build an OpenGL shader program.
/// The source should not contain any null bytes or it will result in an
/// error while converting the source into a CString.
Compiles a file into an OpenGL shader and returns the shader id.
This is mostly used as a helper for `program_from_*` which can be used
to build an OpenGL shader program.
The source should not contain any null bytes or it will result in an
error while converting the source into a CString.
Compiles a file into an OpenGL shader and returns the shader id . This is mostly used as a helper for ` program_from_ * ` which can be used to build an OpenGL shader program . The source should not contain any null bytes or it will result in an error while converting the source into a CString .
pub fn compile_file(path: String, shader_type: ShaderType) 
        -> Result<GLuint, EngineError> {
    // Load the data and provide to compile_from_source
    let shader_data = fs::read_to_string(path).expect("Failed to load shader file.");
    compile_source(shader_data, shader_type)
}
pub fn compile_file ( path : String , shader_type : ShaderType ) -> Result < GLuint , EngineError > { // Load the data and provide to compile_from_source let shader_data = fs :: read_to_string ( path ) . expect ( " " ) ; compile_source ( shader_data , shader_type ) }
Compiles a file into an OpenGL shader and returns the shader id.
Compiles a file into an OpenGL shader and returns the shader id .
path
String
shader_type
ShaderType
path
String
shader_type
ShaderType