Since I've started learning about rendering to a texture I grew to understand that glCopyTexSubImage2D() will copy the designated portion of the screen upside down. I tried a couple of simple things that came to mind in order to prevent/work around this but couldn't find an elegant solution.
there are two problems with doing a ::glScalef(1.0f, -1.0f, 1.0f) before rendering the texture to the screen: 1, I have to do this every time I'm using the texture. 2, I'm mostly working with 2D graphics and have backface culling turned off for GL_BACKsides. As much as possible I'd love to save switching this on and off.
tried switching matrix mode to GL_TEXTURE and doing the ::glScalef(1.0f, -1.0f, 1.0f) transformation on capturing, but the results were the same. (I'm guessing the texture matrix only has an effect on glTexCoord calls?)
So, how can I fix the up-down directions of textures captured with glCopyTexSubImage2D?