mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Reduce redundant glActiveTexture calls.
--HG-- branch : minor
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user