Messing around with when to do glGen, solving a memory leak because of that, and rewriting Scene::spawn to use the instancing stuff.
This commit is contained in:
parent
a199d41890
commit
6ffc6cb4ca
9 changed files with 23 additions and 31 deletions
|
|
@ -83,9 +83,9 @@ unsigned int texture_from_file(const std::string& directory, const std::string&
|
|||
return textureID;
|
||||
}
|
||||
|
||||
void Model::draw(Shader &shader, bool with_textures) {
|
||||
void Model::draw(Shader &shader, bool with_textures, unsigned int count) {
|
||||
for(auto& mesh : meshes) {
|
||||
mesh.draw(shader, with_textures);
|
||||
mesh.draw(shader, with_textures, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue