Eliminate redundant glActiveTexture calls when shaders are used.

The redundant calls were introduced with the previous commit.
This commit is contained in:
Alex Szpakowski
2020-03-15 19:24:49 -03:00
parent 9c2454816f
commit 8fac08809a
3 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -451,7 +451,7 @@ void Shader::attach()
{
const TextureUnit &unit = textureUnits[i];
if (unit.active)
gl.bindTextureToUnit(unit.type, unit.texture, i, false);
gl.bindTextureToUnit(unit.type, unit.texture, i, false, false);
}
// send any pending uniforms to the shader program.
@@ -647,7 +647,7 @@ void Shader::sendTextures(const UniformInfo *info, Texture **textures, int count
int texunit = info->ints[i];
if (shaderactive)
gl.bindTextureToUnit(info->textureType, gltex, texunit, false);
gl.bindTextureToUnit(info->textureType, gltex, texunit, false, false);
// Store texture id so it can be re-bound to the texture unit later.
textureUnits[texunit].texture = gltex;