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
+5
View File
@@ -111,6 +111,9 @@ public:
size_t getMemberOffset(int index) const { return dataMembers[index].offset; }
int getDataMemberIndex(const std::string &name) const;
void setImmutable(bool immutable) { this->immutable = immutable; };
bool isImmutable() const { return immutable; }
/**
* Map a portion of the Buffer to client memory.
*/
@@ -176,6 +179,8 @@ protected:
BufferDataUsage dataUsage;
bool mapped;
bool immutable;
}; // Buffer