Refactor Buffer internals.

Allows buffers created with love.graphics.newBuffer to only allocate VRAM data. Previously they had a copy of their contents in RAM.
Also makes it easier to implement Buffers in other graphics APIs and to implement more types of Buffers in the future.
This commit is contained in:
Alex Szpakowski
2020-12-22 19:23:02 -04:00
parent a1861a8ff4
commit 1f9d98263d
23 changed files with 504 additions and 523 deletions
-1
View File
@@ -34,7 +34,6 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
, size(size)
, typeFlags(settings.typeFlags)
, usage(settings.usage)
, mapFlags(settings.mapFlags)
, mapped(false)
{
if (size == 0 && arraylength == 0)