Creates an object for use with OpenGL. Creates an object from an text file, this can then be used with OpenGL. More...
#include <Object.h>
Public Member Functions | |
Object (std::string objFileName) | |
Object (std::string objFileName, std::string material) | |
~Object () | |
GLuint | getVAO () |
GLuint | getTextureID () |
unsigned int | getNumberOfVertices () |
Private Member Functions | |
void | initialiseTexture (std::vector< float > vertexTextures) |
void | InitialiseVAO (std::string objFileName) |
Private Attributes | |
GLuint | vertexArrayObject |
unsigned int | numberOfVertices |
std::string | material |
GLuint | textureID |
Creates an object for use with OpenGL. Creates an object from an text file, this can then be used with OpenGL.
Object::Object | ( | std::string | objFileName | ) |
Constructs an Object. Creates a vertex array object using a obj file location and OpenGL.
objFileName | The name of the obj file. |
Object::Object | ( | std::string | objFileName, |
std::string | material | ||
) |
Constructs an Object. Creates a vertex array object using a obj file location and OpenGL.
objFileName | The name of the obj file. |
material | The name of the material file. |
Object::~Object | ( | ) |
unsigned int Object::getNumberOfVertices | ( | ) |
Getter # Returns the number of vertices.
GLuint Object::getTextureID | ( | ) |
Getter # Returns the Texture ID.
GLuint Object::getVAO | ( | ) |
Getter # Returns the vertex array object.
|
private |
Initialise the texture.
vertexTextures | The vertex textures vector. |
|
private |
Initialise the vertex array object.
objFileName | The name of the obj file. |
|
private |
The name of the material
|
private |
Number of vertices in the model
|
private |
The Texture