Partially revert "Remove fixed pipeline calls in glsl-based code"

Without this chunk garbage is shown on screen when rendering models

This reverts commit e363e9102f.
pull/3/head
Hleb Valoshka 2019-11-20 00:39:59 +03:00
parent 682aef8422
commit 48824889fa
1 changed files with 9 additions and 0 deletions

View File

@ -4646,6 +4646,15 @@ void Renderer::renderObject(const Vector3f& pos,
astro::daysToSecs(now - astro::J2000),
this);
}
// XXX: this code should be removed
for (unsigned int i = 1; i < 8;/*context->getMaxTextures();*/ i++)
{
glActiveTexture(GL_TEXTURE0 + i);
glDisable(GL_TEXTURE_2D);
}
glActiveTexture(GL_TEXTURE0);
glEnable(GL_TEXTURE_2D);
}
}