Commit 077613dd authored by Matthias Betz's avatar Matthias Betz
Browse files

fix old view data not deleting when loading a new citygml file

parent 80e43ae9
No related merge requests found
Pipeline #10992 passed with stages
in 14 seconds
Showing with 10 additions and 0 deletions
+10 -0
......@@ -336,9 +336,19 @@ function createViewInformation(gl, viewing) {
gl.bindVertexArray(null);
clearViewing(gl);
viewing.push(viewInformation);
}
function clearViewing(gl) {
for (var viewInfo in viewing) {
gl.deleteBuffer(viewInfo.posVbo);
gl.deleteBuffer(viewInfo.colorVbo);
gl.deleteBuffer(viewInfo.indexVbo);
gl.deleteVertexArray(viewInfo.vao);
}
}
function redraw(gl) {
gl.clearBufferfv(gl.COLOR, 0, clearColor);
gl.clearBufferfv(gl.DEPTH, 0, clearDepth);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment