Also support hexcodes in lovr.graphics.clear;

This commit is contained in:
bjorn 2019-04-20 13:38:09 -07:00
parent c247682653
commit 0341233876
1 changed files with 6 additions and 0 deletions

View File

@ -676,6 +676,12 @@ static int l_lovrGraphicsClear(lua_State* L) {
float depth = 1.f;
int stencil = 0;
if (top == 1) {
luax_readcolor(L, index, &color);
lovrGraphicsClear(&color, NULL, NULL);
return 0;
}
if (top >= index) {
if (lua_type(L, index) == LUA_TNUMBER) {
color.r = luax_checkfloat(L, index++);