8 #include "../Maths/Vec2.h" 23 UIObject(
float x,
float y,
float width,
float height);
33 UIObject(
float x,
float y,
float width,
float height, SDL_Surface* surface);
UIObject(float x, float y, float width, float height)
Constructs the UIObject.
Definition: UIObject.cpp:5
Maths::Vec2 convertToOpenGLCoordinate(Maths::Vec2 coordinates)
Converts the coordinates to work with OpenGL. It takes the coordinates and converts them to a number ...
Definition: UIObject.cpp:209
Maths::Vec2 position
The position for the UIObject.
Definition: UIObject.h:52
Maths::Vec2 dimensions
The dimensions for the rectangle.
Definition: UIObject.h:50
void draw(Shader *shader)
A function to draw to the screen.
Definition: UIObject.cpp:224
GLuint obj
The VBO for the rectangle.
Definition: UIObject.h:48
A class for the UI Objects.
Definition: UIObject.h:13
Creates a Shader from an text file, this can then be used with OpenGL.
Definition: Shader.h:12
Contains the Vec2 structure with functions and overloaded operators.
Definition: Vec2.h:16
GLuint textureID
The Texture.
Definition: UIObject.h:54
void initialiseTexture(SDL_Surface *surfac)
Initialise the texture.
Definition: UIObject.cpp:150
~UIObject()
Destructs the UIObject.
Definition: UIObject.cpp:35
bool textureBool
A boolean for if the Model contains a texture.
Definition: UIObject.h:56
void initialiseObject()
Initialise the UIobject.
Definition: UIObject.cpp:42