OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Render.h
Go to the documentation of this file.
1 
9 #ifndef _RENDER_H_
10 #define _RENDER_H_
11 
12 #include <vector>
13 
14 #include <glm/gtc/type_precision.hpp>
15 
16 #include "Room.h"
17 #include "TextureManager.h"
18 
19 enum class RenderMode {
20  LoadScreen,
21  Solid,
22  Wireframe,
23  Texture
24 };
25 
26 class Render {
27  public:
28 
29  static void clearRoomList() { roomList.clear(); }
30 
31  static void display();
32  static void displayUI();
33 
34  static void screenShot(const char* filenameBase);
35 
36  static void drawTexture(float x, float y, float w, float h, glm::vec4 color,
37  unsigned int texture, TextureStorage s);
38 
39  static RenderMode getMode() { return mode; }
40  static void setMode(RenderMode m) { mode = m; }
41 
42  static void setDisplayViewFrustum(bool d) { displayViewFrustum = d; }
43  static bool getDisplayViewFrustum() { return displayViewFrustum; }
44 
45  private:
46  static void buildRoomList(int room = -2, int budget = 10);
47 
48  static RenderMode mode;
49  static std::vector<Room*> roomList;
50 
51  static bool displayViewFrustum;
52 };
53 
54 #endif
55 
static void setMode(RenderMode m)
Definition: Render.h:40
Definition: Render.h:26
RenderMode
Definition: Render.h:19
static void setDisplayViewFrustum(bool d)
Definition: Render.h:42
static void drawTexture(float x, float y, float w, float h, glm::vec4 color, unsigned int texture, TextureStorage s)
Definition: Render.cpp:160
static void displayUI()
Definition: Render.cpp:193
static void buildRoomList(int room=-2, int budget=10)
Definition: Render.cpp:81
static void display()
Definition: Render.cpp:32
static RenderMode getMode()
Definition: Render.h:39
static void screenShot(const char *filenameBase)
Definition: Render.cpp:121
TextureStorage
static std::vector< Room * > roomList
Definition: Render.h:49
Texture Registry.
static void clearRoomList()
Definition: Render.h:29
static bool getDisplayViewFrustum()
Definition: Render.h:43
static bool displayViewFrustum
Definition: Render.h:51
static RenderMode mode
Definition: Render.h:48
Room in World.