+istream &operator>>(istream &in, TextureFilter &tf)
+{
+ string str;
+ in>>str;
+
+ if(str=="NEAREST")
+ tf=NEAREST;
+ else if(str=="LINEAR")
+ tf=LINEAR;
+ else if(str=="NEAREST_MIPMAP_NEAREST")
+ tf=NEAREST_MIPMAP_NEAREST;
+ else if(str=="NEAREST_MIPMAP_LINEAR")
+ tf=NEAREST_MIPMAP_LINEAR;
+ else if(str=="LINEAR_MIPMAP_NEAREST")
+ tf=LINEAR_MIPMAP_NEAREST;
+ else if(str=="LINEAR_MIPMAP_LINEAR")
+ tf=LINEAR_MIPMAP_LINEAR;
+ else
+ in.setstate(ios_base::failbit);
+
+ return in;
+}
+
+