Flipping image (no pun intended ;-)

Hi, I am trying to flip the (whole) image stored in the color buffer (horizontally or vertically). I realize this is done with glCopyPixels() using zoom factor -1. I also know to call glReadBuffer() and glDrawBuffer() to set the source and destination buffers.

The image does not appear correctly flipped, but is “doubled”, i.e. I see the flipped image on top of the original image. I suspect the problem is that the source and destination regions “overlap” (they are actually identical because I am flipping the whole image).

Q1. Can anyone verify that this is indeed the problem?

I have tried to avoid the (suspected) problem by flipping to an auxiliary buffer. However, I find that auxiliary buffers are not implemented! (I am using Windows XP’s standard openGL implementation). This is confirmed by the documentation and by the fact that querying the obtained pixel format for its number of auxiliary buffers returns 0.

Q2. Does anyone know how to successfully flip an image?

Any help will be greatly appreciated.

Hmm, maybe there’s a blending mode enable by default. For example, when texturing, the default mode is GL_MODULATE or something, when you need GL_REPLACE. So I’m guessing that it might be blending the 2 images together. Just some thought for food :slight_smile:

First question: Îòçîâèòåñü, ïîæàëóéñòà, òå , êòî ïîíèìàåò ðóññêèé ÿçûê (èáî ñ àíãëëèéñêèì óìåíÿ ïëîõîâàòî)!!!
Second question: I bind texture to object, but when I rotate object< texture not rotates!!! Please help to solve this problem.

First question: I can’t see what you’re writing.
Second question: check out glTexGen.