texture_from_file.h 561 B

123456789101112131415161718192021222324252627282930
  1. #ifndef IGL_TEXTURE_FROM_FILE_H
  2. #define IGL_TEXTURE_FROM_FILE_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 an image ile and use it as a texture
  10. //
  11. // Input:
  12. // filename path to image file
  13. // Output:
  14. // id of generated openGL texture
  15. // Returns true on success, false on failure
  16. IGL_INLINE bool texture_from_file(const std::string filename, GLuint & id);
  17. }
  18. #ifdef IGL_HEADER_ONLY
  19. # include "texture_from_file.cpp"
  20. #endif
  21. #endif
  22. #endif