Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
UI.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <SDL_image.h>
5 #include <SDL_ttf.h>
6 #include <iostream>
7 #include <unordered_map>
8 #include "Shader.h"
9 #include "UIObject.h"
10 
15 class UI
16 {
17 protected:
20 
27  void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName,
28  std::unordered_map<std::string, Shader*> &shaders);
29 
30 public:
37  UI(std::string vertexShaderFileName, std::string fragmentShaderFileName,
38  std::unordered_map<std::string, Shader*> &shaders);
39 
44  UI(std::unordered_map<std::string, Shader*> &shaders);
45 
49  ~UI();
50 
55  virtual void update(float dt) = 0;
56 
60  virtual void draw() = 0;
61 };
A class for the 2D user interfaces.
Definition: UI.h:15
GLsizei GLsizei GLuint * shaders
Definition: glew.h:1826
Creates a Shader for use with OpenGL. Creates a Shader from an text file, this can then be used with ...
Definition: Shader.h:13
void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
Definition: UI.cpp:26
virtual void update(float dt)=0
virtual void draw()=0
UI(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
Definition: UI.cpp:6
Shader * shader
Definition: UI.h:19
GLsizei const GLchar *const * string
Definition: glew.h:1843
~UI()
Definition: UI.cpp:50