Added example buffer function.
This commit is contained in:
1 parent
3c31c2872d
commit
a40874ceee
4 files changed
+94
-8
No files matched your search
@@ -16,6 +16,12 @@ void Mesh::createBuffers(
|
||||
assertTrue(verticeCount > 0, "Vertice count must be greater than zero.");
|
||||
assertTrue(indiceCount > 0, "Indice count must be greater than zero.");
|
||||
|
||||
// Can we re-use the buffers?
|
||||
if(
|
||||
verticeCount <= this->verticeCount &&
|
||||
indiceCount <= this->indiceCount
|
||||
) return;
|
||||
|
||||
this->disposeBuffers();
|
||||
|
||||
this->verticeCount = verticeCount;
|
||||
|
||||
Reference in new issue
Block a user