mirror of https://github.com/axmolengine/axmol.git
fixed #696 to modify some end() usilization
This commit is contained in:
parent
fea3da3156
commit
53227073a7
|
@ -342,11 +342,8 @@ bool CCRenderTexture::getUIImageFromBuffer(CCImage *pImage, int x, int y, int nW
|
||||||
this->begin();
|
this->begin();
|
||||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||||
glReadPixels(0,0,nReadBufferWidth,nReadBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, pTempData);
|
glReadPixels(0,0,nReadBufferWidth,nReadBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, pTempData);
|
||||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
|
||||||
this->end(false);
|
this->end(false);
|
||||||
#else
|
|
||||||
this->end();
|
|
||||||
#endif
|
|
||||||
// to get the actual texture data
|
// to get the actual texture data
|
||||||
// #640 the image read from rendertexture is upseted
|
// #640 the image read from rendertexture is upseted
|
||||||
for (int i = 0; i < nSavedBufferHeight; ++i)
|
for (int i = 0; i < nSavedBufferHeight; ++i)
|
||||||
|
|
|
@ -196,11 +196,7 @@ void RenderTextureTest::ccTouchesMoved(CCSet* touches, CCEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// finish drawing and return context back to the screen
|
// finish drawing and return context back to the screen
|
||||||
#if CC_ENABLE_CACHE_TEXTTURE_DATA
|
|
||||||
m_target->end(false);
|
m_target->end(false);
|
||||||
#else
|
|
||||||
m_target->end();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderTextureTest::ccTouchesEnded(CCSet* touches, CCEvent* event)
|
void RenderTextureTest::ccTouchesEnded(CCSet* touches, CCEvent* event)
|
||||||
|
|
Loading…
Reference in New Issue