X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexunit.cpp;h=9277c27704ebd8347c3c6a782fc1b6ff05fc8658;hp=31c90777aad10eccd5a4e9d110de2a0846809f26;hb=0f890ce60a560ba2ccc0719229be304bb597d919;hpb=7a2427020ec6ead73258aeb326dfb7e0121520f9 diff --git a/source/texunit.cpp b/source/texunit.cpp index 31c90777..9277c277 100644 --- a/source/texunit.cpp +++ b/source/texunit.cpp @@ -16,13 +16,16 @@ TexUnit *TexUnit::cur_unit = 0; 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; }