TexUnit::TexUnit():
legacy(false),
- texture(0)
+ texture(0),
+ tex_legacy(false)
{ }
-bool TexUnit::set_texture(const Texture *tex)
+bool TexUnit::set_texture(const Texture *tex, bool lgc)
{
- bool result = (tex!=texture);
+ lgc = (lgc && legacy && tex);
+ bool result = (tex!=texture || lgc!=tex_legacy);
texture = tex;
+ tex_legacy = lgc;
return result;
}