mirror of https://github.com/bjornbytes/lovr.git
Fix Pass:mesh error handling;
This commit is contained in:
parent
917b97ca2d
commit
b2b6b14e3e
|
@ -604,7 +604,7 @@ static int l_lovrPassDraw(lua_State* L) {
|
||||||
|
|
||||||
static int l_lovrPassMesh(lua_State* L) {
|
static int l_lovrPassMesh(lua_State* L) {
|
||||||
Pass* pass = luax_checktype(L, 1, Pass);
|
Pass* pass = luax_checktype(L, 1, Pass);
|
||||||
Buffer* vertices = !lua_toboolean(L, 2) ? NULL : luax_totype(L, 2, Buffer);
|
Buffer* vertices = !lua_toboolean(L, 2) ? NULL : luax_checktype(L, 2, Buffer);
|
||||||
Buffer* indices = luax_totype(L, 3, Buffer);
|
Buffer* indices = luax_totype(L, 3, Buffer);
|
||||||
float transform[16];
|
float transform[16];
|
||||||
int index = luax_readmat4(L, indices ? 4 : 3, transform, 1);
|
int index = luax_readmat4(L, indices ? 4 : 3, transform, 1);
|
||||||
|
|
Loading…
Reference in New Issue