Pass shader by reference on mesh/model classes.

This commit is contained in:
Joey de Vries
2020-06-04 17:25:52 +02:00
parent e5d75fb881
commit 3c5fd34424
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ public:
}
// render the mesh
void Draw(Shader shader)
void Draw(Shader &shader)
{
// bind appropriate textures
unsigned int diffuseNr = 1;

View File

@@ -39,7 +39,7 @@ public:
}
// draws the model, and thus all its meshes
void Draw(Shader shader)
void Draw(Shader &shader)
{
for(unsigned int i = 0; i < meshes.size(); i++)
meshes[i].Draw(shader);