destroy_shader_program.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_OPENGL_DESTROY_SHADER_PROGRAM_H
  9. #define IGL_OPENGL_DESTROY_SHADER_PROGRAM_H
  10. #include "../igl_inline.h"
  11. #include "gl.h"
  12. namespace igl
  13. {
  14. namespace opengl
  15. {
  16. /// Properly destroy a shader program. Detach and delete each of its shaders
  17. /// and delete it
  18. ///
  19. /// @param[in] id index id of created shader, set to 0 on error
  20. /// @return true on success, false on error
  21. ///
  22. /// \note caller is responsible for making sure he doesn't foolishly continue
  23. /// to use id as if it still contains a program
  24. ///
  25. /// \see create_shader_program
  26. IGL_INLINE bool destroy_shader_program(const GLuint id);
  27. }
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "destroy_shader_program.cpp"
  31. #endif
  32. #endif