From e1f7c0bab68a86dfc0d3be0981cde97d1c0aa131 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 22 Nov 2012 09:52:50 +0800 Subject: [PATCH] issue #1564: Removing one unnecessary line in CCRenderTexture::visit. --- cocos2dx/misc_nodes/CCRenderTexture.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 73e4dcbe72..fc7656de6a 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -394,9 +394,9 @@ void CCRenderTexture::beginWithClear(float r, float g, float b, float a, float d this->begin(); // save clear color - GLfloat clearColor[4]; - GLfloat depthClearValue; - int stencilClearValue; + GLfloat clearColor[4] = {0.0f}; + GLfloat depthClearValue = 0.0f; + int stencilClearValue = 0; if (flags & GL_COLOR_BUFFER_BIT) { @@ -512,7 +512,6 @@ void CCRenderTexture::visit() if (m_pGrid && m_pGrid->isActive()) { m_pGrid->afterDraw(this); - transformAncestors(); } kmGLPopMatrix(); @@ -528,9 +527,9 @@ void CCRenderTexture::draw() if (m_uClearFlags) { - GLfloat oldClearColor[4]; - GLfloat oldDepthClearValue; - GLint oldStencilClearValue; + GLfloat oldClearColor[4] = {0.0f}; + GLfloat oldDepthClearValue = 0.0f; + GLint oldStencilClearValue = 0; // backup and set if (m_uClearFlags & GL_COLOR_BUFFER_BIT)