Open Source Tomb Raider Engine
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Render.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*!
  2. * \file include/Render.h
  3. * \brief OpenRaider Renderer class
  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 void drawTexture(float x, float y, float w, float h, glm::vec4 color,
  27. unsigned int texture, TextureStorage s);
  28. static RenderMode getMode() { return mode; }
  29. static void setMode(RenderMode m) { mode = m; }
  30. static void setDisplayViewFrustum(bool d) { displayViewFrustum = d; }
  31. static bool getDisplayViewFrustum() { return displayViewFrustum; }
  32. private:
  33. static void buildRoomList(int room = -2);
  34. static RenderMode mode;
  35. static std::vector<Room*> roomList;
  36. static bool displayViewFrustum;
  37. };
  38. #endif