compile_and_link_program.h 625 B

12345678910111213141516171819202122
  1. #ifndef IGL_COMPILE_AND_LINK_PROGRAM_H
  2. #define IGL_COMPILE_AND_LINK_PROGRAM_H
  3. #include "igl_inline.h"
  4. #include "OpenGL_convenience.h"
  5. namespace igl
  6. {
  7. // Compile and link very simple vertex/fragment shaders
  8. //
  9. // Inputs:
  10. // v_str string of vertex shader contents
  11. // f_str string of fragment shader contents
  12. // Returns id of program
  13. //
  14. // Known bugs: this seems to duplicate `create_shader_program` with less
  15. // functionality.
  16. IGL_INLINE GLuint compile_and_link_program(
  17. const char * v_str, const char * f_str);
  18. }
  19. #ifndef IGL_STATIC_LIBRARY
  20. # include "compile_and_link_program.cpp"
  21. #endif
  22. #endif