mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +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
@ -509,7 +509,8 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
datamod[index+1] = original.y;
|
||||
datamod[index+2] = original.z;
|
||||
}
|
||||
vbuf->writeData(0, vbuf->getSizeInBytes(), datamod, false);
|
||||
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);
|
||||
@ -644,15 +647,13 @@ void NIFLoader::createOgreSubMesh(NiTriShape *shape, const String &material, std
|
||||
index += 3;
|
||||
}
|
||||
|
||||
ibuf->writeData(0, ibuf->getSizeInBytes(), datamod, false);
|
||||
ibuf->writeData(0, ibuf->getSizeInBytes(), datamod, false);
|
||||
delete datamod;
|
||||
|
||||
}
|
||||
else
|
||||
ibuf->writeData(0, ibuf->getSizeInBytes(), data->triangles.ptr, false);
|
||||
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