create_mesh_vbo.cpp 891 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "create_mesh_vbo.h"
  2. #include "create_vector_vbo.h"
  3. #include "create_index_vbo.h"
  4. // http://www.songho.ca/opengl/gl_vbo.html#create
  5. IGL_INLINE void igl::create_mesh_vbo(
  6. const Eigen::MatrixXd & V,
  7. const Eigen::MatrixXi & F,
  8. GLuint & V_vbo_id,
  9. GLuint & F_vbo_id)
  10. {
  11. // Create VBO for vertex position vectors
  12. create_vector_vbo(V,V_vbo_id);
  13. // Create VBO for face index lists
  14. create_index_vbo(F,F_vbo_id);
  15. }
  16. // http://www.songho.ca/opengl/gl_vbo.html#create
  17. IGL_INLINE void igl::create_mesh_vbo(
  18. const Eigen::MatrixXd & V,
  19. const Eigen::MatrixXi & F,
  20. const Eigen::MatrixXd & N,
  21. GLuint & V_vbo_id,
  22. GLuint & F_vbo_id,
  23. GLuint & N_vbo_id)
  24. {
  25. // Create VBOs for faces and vertices
  26. create_mesh_vbo(V,F,V_vbo_id,F_vbo_id);
  27. // Create VBO for normal vectors
  28. create_vector_vbo(N,N_vbo_id);
  29. }
  30. #ifndef IGL_HEADER_ONLY
  31. // Explicit template specialization
  32. #endif