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;
}
if(count<0)
{
if(ARB_vertex_shader)
- count = get_i(GL_MAX_TEXTURE_IMAGE_UNITS);
+ count = get_i(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS);
else if(ARB_multitexture)
count = get_i(GL_MAX_TEXTURE_UNITS);
else