init_render_to_texture.h 716 B

12345678910111213141516171819202122232425262728
  1. #ifndef IGL_INIT_RENDER_TO_TEXTURE_H
  2. #define IGL_INIT_RENDER_TO_TEXTURE_H
  3. #include "igl_inline.h"
  4. #include "OpenGL_convenience.h"
  5. #include <cstdlib>
  6. namespace igl
  7. {
  8. // Create a texture+framebuffer+depthbuffer triplet bound for rendering into
  9. // the texture;
  10. //
  11. // Inputs:
  12. // width image width
  13. // height image height
  14. // Outputs:
  15. // tex_id id of the texture
  16. // fbo_id id of the frame buffer object
  17. // dfbo_id id of the depth frame buffer object
  18. IGL_INLINE void init_render_to_texture(
  19. const size_t width,
  20. const size_t height,
  21. GLuint & tex_id,
  22. GLuint & fbo_id,
  23. GLuint & dfbo_id);
  24. }
  25. #ifndef IGL_STATIC_LIBRARY
  26. # include "init_render_to_texture.cpp"
  27. #endif
  28. #endif