From 273d0d22f1f99be2fff8463bfc7557b2851346e4 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 5 Mar 2014 18:50:09 -0800 Subject: [PATCH] little performance improvement in quad command --- cocos/2d/CCGLProgram.cpp | 2 +- cocos/2d/renderer/CCQuadCommand.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cocos/2d/CCGLProgram.cpp b/cocos/2d/CCGLProgram.cpp index 0655a8f9be..9f84a59840 100644 --- a/cocos/2d/CCGLProgram.cpp +++ b/cocos/2d/CCGLProgram.cpp @@ -349,7 +349,7 @@ bool GLProgram::updateUniformLocation(GLint location, const GLvoid* data, unsign { return false; } - + bool updated = true; tHashUniformEntry *element = nullptr; HASH_FIND_INT(_hashForUniforms, &location, element); diff --git a/cocos/2d/renderer/CCQuadCommand.cpp b/cocos/2d/renderer/CCQuadCommand.cpp index edc8ee64df..5c75d43665 100644 --- a/cocos/2d/renderer/CCQuadCommand.cpp +++ b/cocos/2d/renderer/CCQuadCommand.cpp @@ -104,8 +104,7 @@ void QuadCommand::generateMaterialID() void QuadCommand::useMaterial() const { _shader->use(); - - _shader->setUniformsForBuiltins(); + _shader->setUniformsForBuiltins(_mv); //Set texture GL::bindTexture2D(_textureID);