mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -37,7 +37,7 @@ namespace opengl
|
||||
|
||||
Mesh *luax_checkmesh(lua_State *L, int idx)
|
||||
{
|
||||
return luax_checktype<Mesh>(L, idx, Mesh::type);
|
||||
return luax_checktype<Mesh>(L, idx);
|
||||
}
|
||||
|
||||
static inline size_t writeByteData(lua_State *L, int startidx, int components, char *data)
|
||||
@@ -119,7 +119,7 @@ int w_Mesh_setVertices(lua_State *L)
|
||||
|
||||
if (luax_istype(L, 2, Data::type))
|
||||
{
|
||||
Data *d = luax_checktype<Data>(L, 2, Data::type);
|
||||
Data *d = luax_checktype<Data>(L, 2);
|
||||
|
||||
size_t datasize = std::min(d->getSize(), (t->getVertexCount() - vertoffset) * stride);
|
||||
char *bytedata = (char *) t->mapVertexData() + byteoffset;
|
||||
|
||||
Reference in New Issue
Block a user