I am using glReadPixels in order to copy the content of the frame buffer to an image. Of course, the image is in a bottom-up format, but I’d like to have it in a top-down format. Is there any way to tell OpenGL that it should copy the image flipped, or do I have to do it myself? glZoom does not seem to applay for glReadPixels.
of course I can do it myself, but I have written a generic image class for multiple purposes (which is in a top-down format), and the idea was to keep everything as simple and fast as possible - but it seems that I don’t have any luck with glReadPixels for a generic approach. Your idea with OpenGL flipping the framebuffer is neat, but the pixel-copy operation shouldn’t have any side-effects on the framebuffer - flipping twice would be a solution, but things are getting really expensive.
Guess I have to flip it myself or add support for bottom-up images in my lib.