Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Mesh.h 770B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * \file include/Mesh.h
  3. * \brief OpenGL Mesh
  4. *
  5. * \author Mongoose
  6. *
  7. * \todo Unify the parallel systems here, arrays and the allocate/set
  8. */
  9. #ifndef _MESH_H_
  10. #define _MESH_H_
  11. #include <vector>
  12. #include <glm/mat4x4.hpp>
  13. #include <glm/vec2.hpp>
  14. #include <glm/vec3.hpp>
  15. #include "loader/LoaderTR2.h"
  16. class Mesh {
  17. public:
  18. Mesh(const std::vector<RoomVertexTR2>& vertices,
  19. const std::vector<RoomRectangleTR2>& rectangles,
  20. const std::vector<RoomTriangleTR2>& triangles);
  21. void prepare();
  22. void display(glm::mat4 model, glm::mat4 view, glm::mat4 projection);
  23. private:
  24. std::vector<unsigned short> indices;
  25. std::vector<glm::vec3> vertices;
  26. std::vector<glm::vec2> uvs;
  27. std::vector<unsigned int> textures;
  28. };
  29. #endif