Removed debug draw memory leak.
This commit is contained in:
parent
8f6c27ae32
commit
65552409f0
@ -60,5 +60,5 @@ void DebugDraw::draw3dText (const btVector3 &location, const char *textString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DebugDraw::clearData() {
|
void DebugDraw::clearData() {
|
||||||
this->data = std::vector<float>();
|
this->data.clear();
|
||||||
}
|
}
|
||||||
|
@ -491,6 +491,7 @@ void Graphics::render(double time)
|
|||||||
}
|
}
|
||||||
debug_ab->setDataElements(data_count/6, debugData);
|
debug_ab->setDataElements(data_count/6, debugData);
|
||||||
debugDrawer.clearData();
|
debugDrawer.clearData();
|
||||||
|
delete debugData;
|
||||||
debugShader->use();
|
debugShader->use();
|
||||||
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
|
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
|
||||||
debug_vao->render();
|
debug_vao->render();
|
||||||
|
Loading…
Reference in New Issue
Block a user