- more code cleanup based on cppcheck results and valgrind

- added -h option to build-mg.sh to show parameter usage.
This commit is contained in:
SoftCoder
2013-12-22 22:53:26 -08:00
parent 2d3e04f413
commit 3a24531ba7
13 changed files with 104 additions and 119 deletions

View File

@@ -1807,7 +1807,7 @@ Pixmap2D *PixelBufferWrapper::getPixelBufferFor(int x,int y,int w,int h, int col
GLubyte* src = (GLubyte*)glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
if(src) {
pixmapScreenShot = new Pixmap2D(w, h, colorComponents);
memcpy(pixmapScreenShot->getPixels(),src,(size_t)pixmapScreenShot->getPixelByteCount());
memcpy(pixmapScreenShot->getPixels(),src,pixmapScreenShot->getPixelByteCount());
glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB); // release pointer to the mapped buffer
//pixmapScreenShot->save("debugPBO.png");
}