} else {
glActiveTexture(GL_TEXTURE0 + tunit);
glBindTexture(cur_target[tunit], 0);
+ glDisable(cur_target[tunit]);
assert(glGetError() == GL_NO_ERROR);
glActiveTexture(GL_TEXTURE0);
}
void Texture::bind(int tex_unit) const
{
glActiveTexture(GL_TEXTURE0 + tex_unit);
+ glEnable(target);
glBindTexture(target, id);
assert(glGetError() == GL_NO_ERROR);
glActiveTexture(GL_TEXTURE0);