diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 24a2776b2..83d2fe911 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -993,6 +993,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)