Use current() instead of the more complex invocation in Texture::update_parameter
}
}
+const TexEnv *TexEnv::current()
+{
+ return TexUnit::current().get_texenv();
+}
+
void TexEnv::unbind()
{
if(TexUnit::current().set_texenv(0))
const Color &get_color() const { return color; }
void bind() const;
+ static const TexEnv *current();
static void unbind();
};
void Texture::update_parameter(int mask) const
{
- if(TexUnit::current().get_texture()==this)
+ if(current()==this)
{
if(mask&MIN_FILTER)
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, min_filter);