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
@@ -1287,7 +1287,7 @@ void Graphics::points(const float *coords, const uint8 *colors, size_t numpoints
OpenGL::TempDebugGroup debuggroup("Graphics points draw");
gl.prepareDraw();
gl.bindTexture(gl.getDefaultTexture());
gl.bindTextureToUnit(gl.getDefaultTexture(), 0, false);
gl.bindBuffer(BUFFER_VERTEX, 0);
uint32 attribflags = ATTRIBFLAG_POS;
@@ -1550,7 +1550,7 @@ void Graphics::polygon(DrawMode mode, const float *coords, size_t count)
OpenGL::TempDebugGroup debuggroup("Filled polygon draw");
gl.prepareDraw();
gl.bindTexture(gl.getDefaultTexture());
gl.bindTextureToUnit(gl.getDefaultTexture(), 0, false);
gl.bindBuffer(BUFFER_VERTEX, 0);
gl.useVertexAttribArrays(ATTRIBFLAG_POS);
glVertexAttribPointer(ATTRIB_POS, 2, GL_FLOAT, GL_FALSE, 0, coords);