destroy_shader_program.h 706 B

12345678910111213141516171819202122232425262728
  1. #ifndef IGL_DESTROY_SHADER_PROGRAM_H
  2. #define IGL_DESTROY_SHADER_PROGRAM_H
  3. #ifndef IGL_NO_OPENGL
  4. #include "igl_inline.h"
  5. #include "OpenGL_convenience.h"
  6. namespace igl
  7. {
  8. // Properly destroy a shader program. Detach and delete each of its shaders
  9. // and delete it
  10. // Inputs:
  11. // id index id of created shader, set to 0 on error
  12. // Returns true on success, false on error
  13. //
  14. // Note: caller is responsible for making sure he doesn't foolishly continue
  15. // to use id as if it still contains a program
  16. //
  17. // See also: create_shader_program
  18. IGL_INLINE bool destroy_shader_program(const GLuint id);
  19. }
  20. #ifdef IGL_HEADER_ONLY
  21. # include "destroy_shader_program.cpp"
  22. #endif
  23. #endif
  24. #endif