Restore activated texture to GL_TEXTURE0 before calls to irrlicht rendering functions

This commit is contained in:
Elderme 2016-06-21 23:02:07 +02:00
parent c4cb241b62
commit 9de9d98b8f
2 changed files with 4 additions and 0 deletions

View File

@ -577,6 +577,7 @@ void DrawCalls::prepareDrawCalls( ShadowMatrices& shadow_matrices,
// ----------------------------------------------------------------------------
void DrawCalls::renderImmediateDrawList() const
{
glActiveTexture(GL_TEXTURE0);
for(auto node: m_immediate_draw_list)
node->render();
}
@ -584,6 +585,7 @@ void DrawCalls::renderImmediateDrawList() const
// ----------------------------------------------------------------------------
void DrawCalls::renderBillboardList() const
{
glActiveTexture(GL_TEXTURE0);
for(auto billboard: m_billboard_list)
billboard->render();
}
@ -591,6 +593,7 @@ void DrawCalls::renderBillboardList() const
// ----------------------------------------------------------------------------
void DrawCalls::renderParticlesList() const
{
glActiveTexture(GL_TEXTURE0);
for(auto particles: m_particles_list)
particles->render();
}

View File

@ -494,6 +494,7 @@ void ParticleSystemProxy::simulate()
glDrawArrays(GL_POINTS, 0, m_count);
glEndTransformFeedback();
glBindVertexArray(0);
glActiveTexture(GL_TEXTURE0);
glDisable(GL_RASTERIZER_DISCARD);
#ifdef DEBUG_PARTICLES