Add command buffers (WIP)

This commit is contained in:
Lynix
2020-04-02 21:07:01 +02:00
parent cf396b0792
commit f443bec6bc
50 changed files with 1076 additions and 215 deletions

View File

@@ -14,11 +14,7 @@ namespace Nz
{
}
SoftwareBuffer::~SoftwareBuffer()
{
}
bool SoftwareBuffer::Fill(const void* data, UInt32 offset, UInt32 size)
bool SoftwareBuffer::Fill(const void* data, UInt64 offset, UInt64 size)
{
NazaraAssert(!m_mapped, "Buffer is already mapped");
@@ -26,7 +22,7 @@ namespace Nz
return true;
}
bool SoftwareBuffer::Initialize(UInt32 size, BufferUsageFlags /*usage*/)
bool SoftwareBuffer::Initialize(UInt64 size, BufferUsageFlags /*usage*/)
{
// Protect the allocation to prevent a memory exception to escape the function
try
@@ -49,12 +45,17 @@ namespace Nz
return m_buffer.data();
}
UInt64 SoftwareBuffer::GetSize() const
{
return UInt64(m_buffer.size());
}
DataStorage SoftwareBuffer::GetStorage() const
{
return DataStorage_Software;
}
void* SoftwareBuffer::Map(BufferAccess /*access*/, UInt32 offset, UInt32 /*size*/)
void* SoftwareBuffer::Map(BufferAccess /*access*/, UInt64 offset, UInt64 /*size*/)
{
NazaraAssert(!m_mapped, "Buffer is already mapped");