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.

StaticMesh.cpp 647B

1234567891011121314151617181920212223
  1. /*!
  2. * \file src/StaticMesh.cpp
  3. * \brief Static Model Meshes
  4. *
  5. * \author xythobuz
  6. */
  7. #include "global.h"
  8. #include "Render.h"
  9. #include "World.h"
  10. #include "StaticMesh.h"
  11. void StaticMesh::display(glm::mat4 model, glm::mat4 view, glm::mat4 projection) {
  12. getWorld().getMesh(mesh).display(model, view, projection);
  13. if (Render::getMode() == RenderMode::Wireframe) {
  14. bbox1->display(projection * view * model,
  15. glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));
  16. bbox2->display(projection * view * model,
  17. glm::vec3(1.0f, 0.0f, 1.0f), glm::vec3(0.0f, 0.0f, 1.0f));
  18. }
  19. }