Add love.graphics.newVertexBuffer and love.graphics.newBuffer.

This commit is contained in:
Alex Szpakowski
2020-07-26 16:32:18 -03:00
parent d75f5df80d
commit 36b0394afc
3 changed files with 197 additions and 5 deletions
+3
View File
@@ -48,6 +48,9 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
bool indexbuffer = settings.typeFlags & TYPEFLAG_INDEX;
bool vertexbuffer = settings.typeFlags & TYPEFLAG_VERTEX;
if (!indexbuffer && !vertexbuffer)
throw love::Exception("Buffer must be created with at least one buffer type (index or vertex).");
size_t offset = 0;
size_t stride = 0;