render_to_tga.h 610 B

1234567891011121314151617181920212223242526
  1. #ifndef IGL_RENDER_TO_TGA_H
  2. #define IGL_RENDER_TO_TGA_H
  3. #include "igl_inline.h"
  4. #include <string>
  5. namespace igl
  6. {
  7. // Render current open GL image to .tga file
  8. // Inputs:
  9. // tga_file path to output .tga file
  10. // width width of scene and resulting image
  11. // height height of scene and resulting image
  12. /// alpha whether to include alpha channel
  13. // Returns true only if no errors occured
  14. IGL_INLINE bool render_to_tga(
  15. const std::string tga_file,
  16. const int width,
  17. const int height,
  18. const bool alpha);
  19. }
  20. #ifdef IGL_HEADER_ONLY
  21. # include "render_to_tga.cpp"
  22. #endif
  23. #endif