create_index_vbo.h 684 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef IGL_CREATE_INDEX_VBO_H
  2. #define IGL_CREATE_INDEX_VBO_H
  3. #ifndef IGL_NO_OPENGL
  4. #include "igl_inline.h"
  5. // NOTE: It wouldn't be so hard to template this using Eigen's templates
  6. #include <Eigen/Core>
  7. #include "OpenGL_convenience.h"
  8. // Create a VBO (Vertex Buffer Object) for a list of indices:
  9. // GL_ELEMENT_ARRAY_BUFFER_ARB for the triangle indices (F)
  10. namespace igl
  11. {
  12. // Inputs:
  13. // F #F by 3 eigen Matrix of face (triangle) indices
  14. // Outputs:
  15. // F_vbo_id buffer id for face indices
  16. //
  17. IGL_INLINE void create_index_vbo(
  18. const Eigen::MatrixXi & F,
  19. GLuint & F_vbo_id);
  20. }
  21. #ifdef IGL_HEADER_ONLY
  22. # include "create_index_vbo.cpp"
  23. #endif
  24. #endif
  25. #endif