Cleaned up getting wrap and filter modes for Images.

This commit is contained in:
Bill Meltsner
2010-04-11 23:09:53 -04:00
parent b1dac7f381
commit 0e6e7c6c03
+4 -8
View File
@@ -73,10 +73,8 @@ namespace opengl
Image::FilterMode mag = f.mag;
const char * minstr;
const char * magstr;
if (!Image::getConstant(min, minstr))
return luaL_error(L, "Invalid filter mode: %s", minstr);
if (!Image::getConstant(mag, magstr))
return luaL_error(L, "Invalid filter mode: %s", magstr);
Image::getConstant(min, minstr);
Image::getConstant(mag, magstr);
lua_pushstring(L, minstr);
lua_pushstring(L, magstr);
return 2;
@@ -109,10 +107,8 @@ namespace opengl
Image::WrapMode t = w.t;
const char * sstr;
const char * tstr;
if (!Image::getConstant(s, sstr))
return luaL_error(L, "Invalid filter mode: %s", sstr);
if (!Image::getConstant(t, tstr))
return luaL_error(L, "Invalid filter mode: %s", tstr);
Image::getConstant(s, sstr);
Image::getConstant(t, tstr);
lua_pushstring(L, sstr);
lua_pushstring(L, tstr);
return 2;