From 53227073a73e3284e550862a2fe03c24e18e2ae3 Mon Sep 17 00:00:00 2001 From: RongHong Date: Tue, 6 Sep 2011 11:43:09 +0800 Subject: [PATCH] fixed #696 to modify some end() usilization --- cocos2dx/misc_nodes/CCRenderTexture.cpp | 5 +---- tests/tests/RenderTextureTest/RenderTextureTest.cpp | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 75fec26a66..8ecdc913e5 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -342,11 +342,8 @@ bool CCRenderTexture::getUIImageFromBuffer(CCImage *pImage, int x, int y, int nW this->begin(); glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(0,0,nReadBufferWidth,nReadBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, pTempData); -#if CC_ENABLE_CACHE_TEXTTURE_DATA this->end(false); -#else - this->end(); -#endif + // to get the actual texture data // #640 the image read from rendertexture is upseted for (int i = 0; i < nSavedBufferHeight; ++i) diff --git a/tests/tests/RenderTextureTest/RenderTextureTest.cpp b/tests/tests/RenderTextureTest/RenderTextureTest.cpp index edb0d9f7e4..1393f4f645 100644 --- a/tests/tests/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/tests/RenderTextureTest/RenderTextureTest.cpp @@ -196,11 +196,7 @@ void RenderTextureTest::ccTouchesMoved(CCSet* touches, CCEvent* event) } } // finish drawing and return context back to the screen -#if CC_ENABLE_CACHE_TEXTTURE_DATA m_target->end(false); -#else - m_target->end(); -#endif } void RenderTextureTest::ccTouchesEnded(CCSet* touches, CCEvent* event)