Remove unneeded texture unbinds

pull/827/head
Hleb Valoshka 2020-07-11 21:35:23 +03:00
parent 6e8dbde814
commit c26f64a89e
3 changed files with 0 additions and 11 deletions

View File

@ -169,10 +169,7 @@ void Overlay::print(const char* s)
void Overlay::drawRectangle(const Rect& r)
{
if (useTexture && r.tex == nullptr)
{
glBindTexture(GL_TEXTURE_2D, 0);
useTexture = false;
}
renderer.drawRectangle(r, mvp);
}

View File

@ -2838,12 +2838,6 @@ void Renderer::renderObject(const Vector3f& pos,
astro::daysToSecs(now - astro::J2000),
mvp, this);
}
for (unsigned int i = 0; i < 8;/*context->getMaxTextures();*/ i++)
{
glActiveTexture(GL_TEXTURE0 + i);
glBindTexture(GL_TEXTURE_2D, 0);
}
glActiveTexture(GL_TEXTURE0);
}
}

View File

@ -614,8 +614,6 @@ void TextureFont::unbind()
{
flush();
impl->m_shaderInUse = false;
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, 0);
}
short TextureFont::getAdvance(wchar_t ch) const