9 #include <unordered_map> 25 UI(std::string vertexShaderFileName, std::string fragmentShaderFileName,
26 std::unordered_map<std::string, Shader*> &shaders);
32 UI(std::unordered_map<std::string, Shader*> &shaders);
43 virtual void update(
float dt) = 0;
48 virtual void draw() = 0;
60 void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName,
61 std::unordered_map<std::string, Shader*> &shaders);
UI(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders)
Constructs the UI object.
Definition: UI.cpp:5
A class for the 2D user interfaces.
Definition: UI.h:16
void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders)
Initialise the shaders.
Definition: UI.cpp:18
Creates a Shader from an text file, this can then be used with OpenGL.
Definition: Shader.h:12
virtual void update(float dt)=0
A pure virtual function to update the UI.
virtual void draw()=0
A pure virtual function to draw to the screen.
Shader * shader
The shader for the UI.
Definition: UI.h:52
~UI()
Destructs the UI object.
Definition: UI.cpp:39