GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


this doesnt flip properly :> by *_*
        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);
        }