init_render_to_texture.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 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_INIT_RENDER_TO_TEXTURE_H
  9. #define IGL_INIT_RENDER_TO_TEXTURE_H
  10. #include "igl_inline.h"
  11. #include "OpenGL_convenience.h"
  12. #include <cstdlib>
  13. namespace igl
  14. {
  15. // Create a texture+framebuffer+depthbuffer triplet bound for rendering into
  16. // the texture;
  17. //
  18. // Inputs:
  19. // width image width
  20. // height image height
  21. // Outputs:
  22. // tex_id id of the texture
  23. // fbo_id id of the frame buffer object
  24. // dfbo_id id of the depth frame buffer object
  25. IGL_INLINE void init_render_to_texture(
  26. const size_t width,
  27. const size_t height,
  28. GLuint & tex_id,
  29. GLuint & fbo_id,
  30. GLuint & dfbo_id);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "init_render_to_texture.cpp"
  34. #endif
  35. #endif