Removed debug draw memory leak.

This commit is contained in:
Faerbit 2015-03-14 14:52:40 +01:00
parent 8f6c27ae32
commit 65552409f0
2 changed files with 2 additions and 1 deletions

View File

@ -60,5 +60,5 @@ void DebugDraw::draw3dText (const btVector3 &location, const char *textString) {
}
void DebugDraw::clearData() {
this->data = std::vector<float>();
this->data.clear();
}

View File

@ -491,6 +491,7 @@ void Graphics::render(double time)
}
debug_ab->setDataElements(data_count/6, debugData);
debugDrawer.clearData();
delete debugData;
debugShader->use();
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
debug_vao->render();