Add love.graphics.getQuadIndexBuffer.

love's pre-generated quad index buffer is useful when combined with drawShaderVertices. Note that it uses 16 bit indices so it can only draw up to 16k quads in a single call.
This commit is contained in:
Alex Szpakowski
2022-01-03 16:22:08 -04:00
parent 42e8df1489
commit ecbc5ca7f6
6 changed files with 25 additions and 2 deletions
+1
View File
@@ -36,6 +36,7 @@ Buffer::Buffer(Graphics *gfx, const Settings &settings, const std::vector<DataDe
, usageFlags(settings.usageFlags)
, dataUsage(settings.dataUsage)
, mapped(false)
, immutable(false)
{
if (size == 0 && arraylength == 0)
throw love::Exception("Size or array length must be specified.");