Reworked internal anisotropic filtering code to be more concise and intuitive

This commit is contained in:
Alex Szpakowski
2013-03-21 12:21:13 -03:00
parent 7e753a0acb
commit 2009124cf9
16 changed files with 43 additions and 150 deletions
+3 -5
View File
@@ -99,10 +99,9 @@ int w_Canvas_setFilter(lua_State *L)
if (!Image::getConstant(magstr, f.mag))
return luaL_error(L, "Invalid filter mode: %s", magstr);
canvas->setFilter(f);
f.anisotropy = (float) luaL_optnumber(L, 4, 1.0);
float anisotropy = (float) luaL_optnumber(L, 4, 1.0);
canvas->setAnisotropy(anisotropy);
canvas->setFilter(f);
return 0;
@@ -120,8 +119,7 @@ int w_Canvas_getFilter(lua_State *L)
lua_pushstring(L, minstr);
lua_pushstring(L, magstr);
lua_pushnumber(L, canvas->getAnisotropy());
lua_pushnumber(L, f.anisotropy);
return 3;
}