Remove unneeded texture unbinds
parent
6e8dbde814
commit
c26f64a89e
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue