Reduce redundant glActiveTexture calls.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-10-21 22:19:16 -03:00
parent b9c01b8674
commit 14f1afa446
11 changed files with 33 additions and 41 deletions
+2 -2
View File
@@ -582,9 +582,9 @@ void Mesh::draw(const Matrix4 &m)
gl.useVertexAttribArrays(enabledattribs);
if (texture.get())
gl.bindTexture(*(GLuint *) texture->getHandle());
gl.bindTextureToUnit(*(GLuint *) texture->getHandle(), 0, false);
else
gl.bindTexture(gl.getDefaultTexture());
gl.bindTextureToUnit(gl.getDefaultTexture(), 0, false);
OpenGL::TempTransform transform(gl);
transform.get() *= m;