This returns a pointer to a blank material.
void material_free(Material * mat);
Deletes a material
void material_add_path(const char * path);
Adds a path where .mat and images files will be searched for.
Material * material_load(const char * name);
Loads a material from disk.
Material * material_edit(const char * name);
Same as material_load, but material_edit does not discard the parse tree of the .mat file. This allows material files to be reconstructed exactly.
Material * material_edit_str(const char * matfile);
Instead of loading a .mat file off of disk, use the string provided.
void material_save(const Material * mat, const char * filename);
If a material file was loaded with material_edit, reconstruct the .mat file and save it to disk.
void material_gl_use(Material * mat);
Change the texture, etc. in OpenGL to the specified material.