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:
Zed A. Shaw 2026-09-10 15:22:21 -04:00
parent a199d41890
commit 6ffc6cb4ca
9 changed files with 23 additions and 31 deletions

View file

@ -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);
}
}