mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +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:
@@ -242,6 +242,12 @@ int w_getDPIScale(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_getQuadIndexBuffer(lua_State *L)
|
||||
{
|
||||
luax_pushtype(L, instance()->getQuadIndexBuffer());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Graphics::RenderTarget checkRenderTarget(lua_State *L, int idx)
|
||||
{
|
||||
lua_rawgeti(L, idx, 1);
|
||||
@@ -3671,6 +3677,7 @@ static const luaL_Reg functions[] =
|
||||
{ "getPixelHeight", w_getPixelHeight },
|
||||
{ "getPixelDimensions", w_getPixelDimensions },
|
||||
{ "getDPIScale", w_getDPIScale },
|
||||
{ "getQuadIndexBuffer", w_getQuadIndexBuffer },
|
||||
|
||||
{ "setScissor", w_setScissor },
|
||||
{ "intersectScissor", w_intersectScissor },
|
||||
|
||||
Reference in New Issue
Block a user