fixed #696 to modify some end() usilization

This commit is contained in:
RongHong 2011-09-06 11:43:09 +08:00
parent fea3da3156
commit 53227073a7
2 changed files with 1 additions and 8 deletions

View File

@ -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)

View File

@ -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)