Add Model:getMaterialName;

This commit is contained in:
bjorn 2022-08-17 22:05:05 -07:00
parent 7087cef57f
commit f570ee980c
1 changed files with 5 additions and 0 deletions

View File

@ -338,6 +338,10 @@ static int l_lovrModelGetMaterialCount(lua_State* L) {
return luax_callmodeldata(L, "getMaterialCount", 1);
}
static int l_lovrModelGetMaterialName(lua_State* L) {
return luax_callmodeldata(L, "getMaterialName", 1);
}
static int l_lovrModelGetTextureCount(lua_State* L) {
return luax_callmodeldata(L, "getImageCount", 1);
}
@ -396,6 +400,7 @@ const luaL_Reg lovrModel[] = {
{ "getVertexBuffer", l_lovrModelGetVertexBuffer },
{ "getIndexBuffer", l_lovrModelGetIndexBuffer },
{ "getMaterialCount", l_lovrModelGetMaterialCount },
{ "getMaterialName", l_lovrModelGetMaterialName },
{ "getTextureCount", l_lovrModelGetTextureCount },
{ "getMaterial", l_lovrModelGetMaterial },
{ "getTexture", l_lovrModelGetTexture },