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

@@ -30,7 +30,7 @@ class NAZARA_API NzBuffer : public NzResource, NzNonCopyable
bool Create(unsigned int length, nzUInt8 typeSize, nzBufferStorage storage = nzBufferStorage_Software, nzBufferUsage usage = nzBufferUsage_Static);
void Destroy();
bool Fill(const void* data, unsigned int offset, unsigned int length);
bool Fill(const void* data, unsigned int offset, unsigned int length, bool forceDiscard = false);
NzBufferImpl* GetImpl() const;
unsigned int GetLength() const;

View File

@@ -18,7 +18,7 @@ class NAZARA_API NzBufferImpl
virtual bool Create(unsigned int size, nzBufferUsage usage = nzBufferUsage_Static) = 0;
virtual void Destroy() = 0;
virtual bool Fill(const void* data, unsigned int offset, unsigned int size) = 0;
virtual bool Fill(const void* data, unsigned int offset, unsigned int size, bool forceDiscard = false) = 0;
virtual void* GetPointer() = 0;