Component that handles rendering a 3D mesh for an Actor. Manages the texture, draw order, ...
MeshComponent(Actor* pOwner, Mesh* pMesh, ShaderProgram* pProgram);
Constructor of a mesh component. It needs an owner, a mesh and a shaderprogram if you want to override the basicMeshShaderProgram.
virtual void SetMesh(Mesh& pMesh);
Sets the mesh that will be rendered.
void SetTextureIndex(unsigned int pTextureIndex);
Sets the texture index in the mesh.
For now the textures used by a mesh are stored in a vector in the mesh.
inline Mesh* GetMesh() const;
Returns the mesh.
void SetShaderProgram(ShaderProgram pShaderProgram);
Sets the shaderprogram.
inline ShaderProgram& GetShaderProgram();
Returns the shaderprogram.
void SetTiling(Vector2D pTiling);
Sets the texture tiling.