mirror of
https://github.com/glest/glest-source.git
synced 2025-09-28 08:29:00 +02:00
- 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:
@@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user