diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index c098a67ae..273131ff3 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -1004,6 +1004,11 @@ void OpenGL::bindTextureToUnit(TextureType target, GLuint texture, int textureun else state.curTextureUnit = textureunit; } + else if (!restoreprev && textureunit != state.curTextureUnit) + { + glActiveTexture(GL_TEXTURE0 + textureunit); + state.curTextureUnit = textureunit; + } } void OpenGL::bindTextureToUnit(Texture *texture, int textureunit, bool restoreprev)