Fixed a crash and memory leak on the ribbon code

OpenGL needs to unlock buffers on inverse order to work.
This commit is contained in:
Anis 2014-12-02 13:39:57 +01:00
parent 5e74a465a9
commit 830ab77628

View file

@ -672,9 +672,9 @@ void Ribbon::createBuffers(SceneRenderState *state, GFXVertexBufferHandle<GFXVer
Point3F pointA = verts[count-1].point;
Point3F pointB = verts[0].point;
verts.unlock();
pb.unlock();
verts.unlock();
Point3F diffSize = pointA - pointB;
Box3F objBox;
@ -704,4 +704,4 @@ void Ribbon::createBuffers(SceneRenderState *state, GFXVertexBufferHandle<GFXVer
}
mUpdateBuffers = false;
}
}