texture_from_tga.h 545 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_TEXTURE_FROM_TGA_H
  2. #define IGL_TEXTURE_FROM_TGA_H
  3. #ifndef IGL_NO_OPENGL
  4. #include "igl_inline.h"
  5. #include "OpenGL_convenience.h"
  6. #include <string>
  7. namespace igl
  8. {
  9. // Read an image from a .tga file and use it as a texture
  10. //
  11. // Input:
  12. // tga_file path to .tga file
  13. // Output:
  14. // id of generated openGL texture
  15. // Returns true on success, false on failure
  16. IGL_INLINE bool texture_from_tga(const std::string tga_file, GLuint & id);
  17. }
  18. #ifdef IGL_HEADER_ONLY
  19. # include "texture_from_tga.cpp"
  20. #endif
  21. #endif
  22. #endif