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/vec2.hpp>
  12. #include <glm/vec4.hpp>
  13. #include <glm/gtc/type_precision.hpp>
  14. #include "Room.h"
  15. #include "TextureManager.h"
  16. enum class RenderMode {
  17. LoadScreen,
  18. Solid,
  19. Wireframe,
  20. Texture
  21. };
  22. class Render {
  23. public:
  24. static RenderMode getMode();
  25. static void setMode(RenderMode m);
  26. static void display();
  27. static void displayUI();
  28. static void clearRoomList();
  29. static void screenShot(const char* filenameBase);
  30. static void drawTexture(float x, float y, float w, float h, glm::vec4 color,
  31. unsigned int texture, TextureManager::TextureStorage s);
  32. static void setDisplayViewFrustum(bool d) { displayViewFrustum = d; }
  33. static bool getDisplayViewFrustum() { return displayViewFrustum; }
  34. private:
  35. static void buildRoomList(int room);
  36. static RenderMode mode;
  37. static std::vector<Room*> roomList;
  38. static bool displayViewFrustum;
  39. };
  40. #endif