remove unused variables

This commit is contained in:
vision 2014-05-26 13:49:00 +08:00
parent 7edfe78f7d
commit 21f7e34d18
1 changed files with 1 additions and 3 deletions

View File

@ -1230,8 +1230,6 @@ void Director::onCaptureScreen(const std::function<void(bool, const std::string&
frameSize = frameSize * _openGLView->getFrameZoomFactor() * _openGLView->getRetinaFactor(); frameSize = frameSize * _openGLView->getFrameZoomFactor() * _openGLView->getRetinaFactor();
#endif #endif
int originx = 0;
int originy = 0;
int width = static_cast<int>(frameSize.width); int width = static_cast<int>(frameSize.width);
int height = static_cast<int>(frameSize.height); int height = static_cast<int>(frameSize.height);
@ -1247,7 +1245,7 @@ void Director::onCaptureScreen(const std::function<void(bool, const std::string&
} }
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(originx, originy, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer.get()); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer.get());
std::shared_ptr<GLubyte> flippedBuffer(new GLubyte[width * height * 4], [](GLubyte* p) { CC_SAFE_DELETE_ARRAY(p); }); std::shared_ptr<GLubyte> flippedBuffer(new GLubyte[width * height * 4], [](GLubyte* p) { CC_SAFE_DELETE_ARRAY(p); });
if (!flippedBuffer) if (!flippedBuffer)