mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
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:
@@ -166,7 +166,7 @@ bool Buffer::supportsOrphan() const
|
||||
|
||||
void *Buffer::map(MapType /*map*/, size_t offset, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
if (size == 0 || isImmutable())
|
||||
return nullptr;
|
||||
|
||||
Range r(offset, size);
|
||||
@@ -229,7 +229,7 @@ void Buffer::unmap(size_t usedoffset, size_t usedsize)
|
||||
|
||||
void Buffer::fill(size_t offset, size_t size, const void *data)
|
||||
{
|
||||
if (size == 0)
|
||||
if (size == 0 || isImmutable())
|
||||
return;
|
||||
|
||||
size_t buffersize = getSize();
|
||||
|
||||
Reference in New Issue
Block a user