Buffer::Unmap no longer return boolean

Made no sense: What do you want to do when your buffer doesn't unmap ?
Tt now throw a warning by itself in case of failure


Former-commit-id: f776af16787316bbe1d55686a1db2c2e0f79d210
This commit is contained in:
Lynix
2012-12-31 11:30:19 +01:00
parent c65f0e9f7e
commit 02f5385eaf
6 changed files with 11 additions and 18 deletions

View File

@@ -227,8 +227,7 @@ bool NzMD5MeshParser::Parse(NzMesh* mesh)
}
}
if (!indexBuffer->Unmap())
NazaraWarning("Failed to unmap index buffer");
indexBuffer->Unmap();
std::unique_ptr<NzVertexBuffer> vertexBuffer(new NzVertexBuffer(NzMesh::GetDeclaration(), vertexCount, m_parameters.storage, nzBufferUsage_Dynamic));
@@ -399,8 +398,7 @@ bool NzMD5MeshParser::Parse(NzMesh* mesh)
vertex++;
}
if (!vertexBuffer->Unmap())
NazaraWarning("Failed to unmap vertex buffer");
vertexBuffer->Unmap();
// Submesh
std::unique_ptr<NzStaticMesh> subMesh(new NzStaticMesh(mesh));