shaders.h 513 B

1234567891011121314151617
  1. #ifndef _SHADERS_
  2. #define _SHADERS_
  3. unsigned int create_shader(int type, const char *src);
  4. unsigned int create_program(unsigned int vsdr, unsigned int fsdr);
  5. //Converts file contents to char* and calls create_shader with it
  6. unsigned int load_shader(int type, const char *fname);
  7. /* Takes filename vertex and fragment shader as parameters,
  8. * calls load_shader for each of them,
  9. * returns create_program with the created shaders.
  10. */
  11. unsigned int load_program(const char *vfname, const char *ffname);
  12. #endif