PDA

View Full Version : create mirror image of framrbuffer



orendavd
06-01-2007, 01:27 AM
hi there,
I'm using glCopyTexSubImage2D to copy pixels from the framebuffer into a two-dimensional texture image, I need to get the mirror image of this buffer, how can I do it???


////***** *****////
******** ********
-----**** ------> ****-----
******** ********
******** ********

I'm really new into OGL and takes me alot of time to figure how to do something. I work under VegaPrime (c++/OGL) I have a camera/channel that shows me the rear view of the car, now I need to put this channel/camera into the rear view mirror. but because the camera is rotated 180 relative to the car I get a wrong view. (I get the mirror image of the image I need)

10x

k_szczech
06-01-2007, 02:17 AM
Do not mirror the texture - just use reversed texture coordinates when using this texture :)
You may also use glScalef(-1, 1, 1) on projection matrix when rendering th this texture if you still want to mirror it.