mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Issue #225: Free memory allocated for sending into HardwareVertexBuffer.
Free memory allocated for sending into HardwareVertexBuffer in NIFLoader class.
This commit is contained in:
parent
5185a28b60
commit
2b9845a5b6
@ -510,6 +510,7 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
datamod[index+2] = original.z;
|
||||
}
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), datamod, false);
|
||||
delete datamod;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -550,6 +551,7 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
datamod[index+2] = original.z;
|
||||
}
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), datamod, false);
|
||||
delete datamod;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -601,6 +603,7 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
datamod[i + 1] =y;
|
||||
}
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), datamod, false);
|
||||
delete datamod;
|
||||
}
|
||||
else
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), data->uvlist.ptr, false);
|
||||
@ -645,14 +648,12 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
}
|
||||
|
||||
ibuf->writeData(0, ibuf->getSizeInBytes(), datamod, false);
|
||||
delete datamod;
|
||||
|
||||
}
|
||||
else
|
||||
ibuf->writeData(0, ibuf->getSizeInBytes(), data->triangles.ptr, false);
|
||||
sub->indexData->indexBuffer = ibuf;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Set material if one was given
|
||||
|
Loading…
x
Reference in New Issue
Block a user