lua/wrappers/gfx/lua_texture.cpp
/**
	 * Sets the texture from the given filename.
	 * The filename is relative data folder.
	 *
	 * @param string filename The filename to load from.
	 * @returns am.code Return codes:
	 * <table class='return_codes'>
	 *  <tr><td>success</td><td>The texture loaded the new file successfully.</td></tr>
	 *  <tr><td>file_not_found</td><td>Texture didn't load because the file could not be found.</td></tr>
	 *  <tr><td>texture_load_failed</td><td>Texture didn't load because there was an issue with the file.</td></tr>
	 * </table>
	 **/
Sets the texture from the given filename.
The filename is relative data folder.

@param string filename The filename to load from.
@returns am.code Return codes:

successThe texture loaded the new file successfully.
file_not_foundTexture didn't load because the file could not be found.
texture_load_failedTexture didn't load because there was an issue with the file.

Sets the texture from the given filename . The filename is relative data folder . @param string filename The filename to load from . @returns am . code Return codes : successThe texture loaded the new file successfully . file_not_foundTexture didn ' t load because the file could not be found . texture_load_failedTexture didn ' t load because there was an issue with the file .
int Texture_filename(lua_State *lua)
	{
		Texture *texture = castUData<Texture>(lua, 1);
		if (texture)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, texture->getFilename());
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				lua_pushinteger(lua, texture->setFilename(lua_tostring(lua, 2)));
				return 1;
			}
			return LuaState::expectedArgs(lua, "filename", "string filename");
		}
		return LuaState::expectedContext(lua, "filename", "am.texture");
	}
int Texture_filename ( lua_State * lua ) { Texture * texture = castUData < Texture > ( lua , 1 ) ; if ( texture ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , texture -> getFilename ( ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { lua_pushinteger ( lua , texture -> setFilename ( lua_tostring ( lua , 2 ) ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the texture from the given filename.
Sets the texture from the given filename .