Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
UIObject.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <glm.hpp>
5 #include <SDL.h>
6 #include "Shader.h"
7 
12 class UIObject
13 {
14 private:
18  glm::vec2 dimensions;
20  glm::vec2 position;
25 
29  void initialiseObject();
30 
35  void initialiseObject(SDL_Surface* surface);
36 
41  void initialiseTexture(SDL_Surface* surfac);
42 
51  glm::vec2 convertToOpenGLCoordinate(glm::vec2 coordinates);
52 
53 public:
61  UIObject(float x, float y, float width, float height);
62 
71  UIObject(float x, float y, float width, float height, SDL_Surface* surface);
72 
76  ~UIObject();
77 
82  void draw(Shader * shader);
83 };
UIObject(float x, float y, float width, float height)
Definition: UIObject.cpp:6
unsigned int GLuint
Definition: glew.h:276
glm::vec2 position
Definition: UIObject.h:20
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1251
glm::vec2 dimensions
Definition: UIObject.h:18
GLuint shader
Definition: glew.h:1812
glm::vec2 convertToOpenGLCoordinate(glm::vec2 coordinates)
Definition: UIObject.cpp:227
void draw(Shader *shader)
Definition: UIObject.cpp:244
GLuint obj
Definition: UIObject.h:16
A class for the UI Objects.
Definition: UIObject.h:12
Creates a Shader for use with OpenGL. Creates a Shader from an text file, this can then be used with ...
Definition: Shader.h:13
GLint GLint GLint GLint GLint x
Definition: glew.h:1251
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1251
GLuint textureID
Definition: UIObject.h:22
void initialiseTexture(SDL_Surface *surfac)
Definition: UIObject.cpp:165
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1251
~UIObject()
Definition: UIObject.cpp:42
bool textureBool
Definition: UIObject.h:24
void initialiseObject()
Definition: UIObject.cpp:52