1
| | unsigned int pixelsinarow = (bytesPerPixel * texture.width);
GLubyte *temp = new GLubyte[pixelsinarow];
for(unsigned int x = 0, y = texture.height; x < texture.height/2; ++x, --y)
{
memcpy(temp, texture.pImageData, pixelsinarow);
memcpy(texture.pImageData, texture.pImageData+y, pixelsinarow);
memcpy(texture.pImageData+y, temp, pixelsinarow);
} |