Fixing mismatching deallocation.
This commit is contained in:
parent
3de85042d0
commit
300f14c752
@ -560,7 +560,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;
|
delete[] debugData;
|
||||||
debugShader->use();
|
debugShader->use();
|
||||||
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
|
debugShader->setUniform("viewProjectionMatrix", lightingViewProjectionMatrix);
|
||||||
debug_vao->render();
|
debug_vao->render();
|
||||||
|
@ -97,7 +97,7 @@ SharedVertexArrayObject Terrain::makeTriangleMesh(int startX, int startZ, int en
|
|||||||
}
|
}
|
||||||
|
|
||||||
ab->setDataElements(numVertices, abData);
|
ab->setDataElements(numVertices, abData);
|
||||||
delete abData;
|
delete[] abData;
|
||||||
vao->bind();
|
vao->bind();
|
||||||
vao->setMode(GL_TRIANGLE_STRIP);
|
vao->setMode(GL_TRIANGLE_STRIP);
|
||||||
vao->attachAllAttributes(ab);
|
vao->attachAllAttributes(ab);
|
||||||
|
Loading…
Reference in New Issue
Block a user