YAGE
1.0
Yet Another Game Engine
|
#include <Model.h>
Public Member Functions | |
Model () | |
Model (Transform *t) | |
virtual | ~Model () |
void | SetProgram (GLuint) override |
Sets the main shader program corresponding to this object. More... | |
void | SetShadowProgram (GLuint) override |
Sets the shadow pass shader program corresponding to this object. More... | |
void | Destroy () override |
Destroys this object. More... | |
virtual std::vector< VertexFormat > | GetVertices ()=0 |
GLuint | GetVao () const |
const std::vector< GLuint > & | GetVbos () const |
const GLuint | GetTexture (const std::string &) const override |
Gets a texture. More... | |
void | SetTexture (const std::string &textureName, const TextureType &textureType, const GLuint &texture) override |
Adds a texture to an object. More... | |
![]() | |
virtual | ~IGameObject () |
Destructor that deletes the unique shader program and shadow program belonging to the object. More... | |
virtual void | Draw (GLuint shader)=0 |
Draws via the given shader. More... | |
virtual void | DrawShadow (GLuint shader)=0 |
Draw shadows via the given shader. More... | |
virtual void | Update ()=0 |
Updates this object. More... | |
virtual GLuint | GetProgram () |
Gets the object's main shader program. More... | |
virtual GLuint | GetShadowProgram () |
Gets the object's shadow program. More... | |
Protected Attributes | |
Transform * | transform |
GLuint | vao |
std::vector< GLuint > | vbos |
std::vector< Texture > | textures |
![]() | |
GLuint | program = 0 |
GLuint | shadowProgram = 0 |
Model::Model | ( | ) |
Model::Model | ( | Transform * | t | ) |
|
virtual |
|
overridevirtual |
Destroys this object.
Implements IGameObject.
|
overridevirtual |
Gets a texture.
textureName | The name of the texture. |
Implements IGameObject.
GLuint Model::GetVao | ( | ) | const |
const std::vector< GLuint > & Model::GetVbos | ( | ) | const |
|
pure virtual |
Implemented in Mesh.
|
overridevirtual |
Sets the main shader program corresponding to this object.
shaderName | Name of the shader. |
Reimplemented from IGameObject.
|
overridevirtual |
Sets the shadow pass shader program corresponding to this object.
shaderName | Name of the shader. |
Reimplemented from IGameObject.
|
overridevirtual |
Adds a texture to an object.
textureName | Name of the texture. |
textureType | Type of the texture. |
texture | The texture id. |
Implements IGameObject.
|
protected |
|
protected |
|
protected |
|
protected |