mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Add Buffer methods
flush, setArrayData, setElement, getElement, getElementCount, getElementStride, getSize, getFormat
This commit is contained in:
@@ -226,6 +226,9 @@ int w_SpriteBatch_attachAttribute(lua_State *L)
|
||||
{
|
||||
Mesh *mesh = luax_checktype<Mesh>(L, 3);
|
||||
buffer = mesh->getVertexBuffer();
|
||||
if (buffer == nullptr)
|
||||
return luaL_error(L, "Mesh does not have its own vertex buffer.");
|
||||
luax_markdeprecated(L, "SpriteBatch:attachAttribute(name, mesh)", API_METHOD, DEPRECATED_REPLACED, "SpriteBatch:attachAttribute(name, buffer)");
|
||||
}
|
||||
|
||||
luax_catchexcept(L, [&](){ t->attachAttribute(name, buffer); });
|
||||
|
||||
Reference in New Issue
Block a user