mirror of https://github.com/bjornbytes/lovr.git
Pass:getClear only includes depth when depth buffer exists;
This commit is contained in:
parent
ee809ec31a
commit
48ec18573a
|
@ -94,11 +94,15 @@ static int l_lovrPassGetClear(lua_State* L) {
|
||||||
lua_rawseti(L, -2, i + 1);
|
lua_rawseti(L, -2, i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_pushnumber(L, depth);
|
const PassInfo* info = lovrPassGetInfo(pass);
|
||||||
lua_setfield(L, -2, "depth");
|
|
||||||
|
|
||||||
lua_pushinteger(L, stencil);
|
if (info->canvas.depth.format || info->canvas.depth.texture) {
|
||||||
lua_setfield(L, -2, "stencil");
|
lua_pushnumber(L, depth);
|
||||||
|
lua_setfield(L, -2, "depth");
|
||||||
|
|
||||||
|
lua_pushinteger(L, stencil);
|
||||||
|
lua_setfield(L, -2, "stencil");
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue