Added example buffer function.
This commit is contained in:
@ -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