Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Render.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*!
  2. * \file include/Render.h
  3. * \brief World Renderer
  4. *
  5. * \author Mongoose
  6. * \author xythobuz
  7. */
  8. #ifndef _RENDER_H_
  9. #define _RENDER_H_
  10. #include <vector>
  11. #include <glm/gtc/type_precision.hpp>
  12. #include "Room.h"
  13. #include "TextureManager.h"
  14. enum class RenderMode {
  15. LoadScreen,
  16. Solid,
  17. Wireframe,
  18. Texture
  19. };
  20. class Render {
  21. public:
  22. static void clearRoomList() { roomList.clear(); }
  23. static void display();
  24. static void displayUI();
  25. static void screenShot(const char* filenameBase);
  26. static RenderMode getMode() { return mode; }
  27. static void setMode(RenderMode m) { mode = m; }
  28. static void setDisplayViewFrustum(bool d) { displayViewFrustum = d; }
  29. static bool getDisplayViewFrustum() { return displayViewFrustum; }
  30. private:
  31. static void buildRoomList(glm::mat4 VP, int room = -2,
  32. glm::vec2 min = glm::vec2(-1.0f, -1.0f),
  33. glm::vec2 max = glm::vec2(1.0f, 1.0f));
  34. static RenderMode mode;
  35. static std::vector<Room*> roomList;
  36. static bool displayViewFrustum;
  37. static bool displayVisibilityCheck;
  38. };
  39. #endif