mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-25 10:11:33 +00:00
Fix memory leak
This commit is contained in:
parent
f8690dcd20
commit
aafff1deb6
1 changed files with 2 additions and 1 deletions
|
@ -1159,10 +1159,11 @@ namespace NifOsg
|
||||||
morphGeom->setUpdateCallback(NULL);
|
morphGeom->setUpdateCallback(NULL);
|
||||||
morphGeom->setCullCallback(new UpdateMorphGeometry);
|
morphGeom->setCullCallback(new UpdateMorphGeometry);
|
||||||
morphGeom->setUseVertexBufferObjects(true);
|
morphGeom->setUseVertexBufferObjects(true);
|
||||||
morphGeom->getOrCreateVertexBufferObject()->setUsage(GL_DYNAMIC_DRAW_ARB);
|
|
||||||
|
|
||||||
triShapeToGeometry(triShape, morphGeom, parentNode, composite, boundTextures, animflags);
|
triShapeToGeometry(triShape, morphGeom, parentNode, composite, boundTextures, animflags);
|
||||||
|
|
||||||
|
morphGeom->getOrCreateVertexBufferObject()->setUsage(GL_DYNAMIC_DRAW_ARB);
|
||||||
|
|
||||||
const std::vector<Nif::NiMorphData::MorphData>& morphs = morpher->data.getPtr()->mMorphs;
|
const std::vector<Nif::NiMorphData::MorphData>& morphs = morpher->data.getPtr()->mMorphs;
|
||||||
if (morphs.empty())
|
if (morphs.empty())
|
||||||
return morphGeom;
|
return morphGeom;
|
||||||
|
|
Loading…
Reference in a new issue