destroy_shader_program.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  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_DESTROY_SHADER_PROGRAM_H
  9. #define IGL_DESTROY_SHADER_PROGRAM_H
  10. #ifndef IGL_NO_OPENGL
  11. #include "igl_inline.h"
  12. #include "OpenGL_convenience.h"
  13. namespace igl
  14. {
  15. // Properly destroy a shader program. Detach and delete each of its shaders
  16. // and delete it
  17. // Inputs:
  18. // id index id of created shader, set to 0 on error
  19. // Returns true on success, false on error
  20. //
  21. // Note: caller is responsible for making sure he doesn't foolishly continue
  22. // to use id as if it still contains a program
  23. //
  24. // See also: create_shader_program
  25. IGL_INLINE bool destroy_shader_program(const GLuint id);
  26. }
  27. #ifndef IGL_STATIC_LIBRARY
  28. # include "destroy_shader_program.cpp"
  29. #endif
  30. #endif
  31. #endif