Moved anisotropic filtering to Image:setFilter(min, mag, anisotropy), added anisotropic filtering support to canvases and fonts

This commit is contained in:
Alex Szpakowski
2013-03-20 23:23:26 -03:00
parent 8c406b7a4b
commit 25d6700361
14 changed files with 187 additions and 71 deletions
+5 -1
View File
@@ -112,6 +112,9 @@ int w_Font_setFilter(lua_State *L)
return luaL_error(L, "%s", e.what());
}
float anisotropy = (float) luaL_optnumber(L, 4, 1.0);
t->setAnisotropy(anisotropy);
return 0;
}
@@ -125,7 +128,8 @@ int w_Font_getFilter(lua_State *L)
Image::getConstant(f.mag, magstr);
lua_pushstring(L, minstr);
lua_pushstring(L, magstr);
return 2;
lua_pushnumber(L, t->getAnisotropy());
return 3;
}
int w_Font_getAscent(lua_State *L)