Optimized Buffer locking/filling

Former-commit-id: 41cb66257f3eeef375086bf51f26230a06ca9eb8
This commit is contained in:
Lynix
2013-03-06 22:40:15 +01:00
parent aa67a52e9c
commit 9f780ef2bd
8 changed files with 26 additions and 17 deletions

View File

@@ -117,7 +117,7 @@ void NzBuffer::Destroy()
}
}
bool NzBuffer::Fill(const void* data, unsigned int offset, unsigned int length)
bool NzBuffer::Fill(const void* data, unsigned int offset, unsigned int length, bool forceDiscard)
{
#if NAZARA_UTILITY_SAFE
if (!m_impl)
@@ -133,7 +133,7 @@ bool NzBuffer::Fill(const void* data, unsigned int offset, unsigned int length)
}
#endif
return m_impl->Fill(data, offset*m_typeSize, ((length == 0) ? m_length-offset : length)*m_typeSize);
return m_impl->Fill(data, offset*m_typeSize, ((length == 0) ? m_length-offset : length)*m_typeSize, forceDiscard);
}
NzBufferImpl* NzBuffer::GetImpl() const