I was wondering if there was a better way to invert color pixels in a frame buffer. I know that this can be done with glReadPixels()and glDrawPixels(), but the performance of these calls is quite large.
Basically, what I'm trying to do is upside down colored crosshairs that are always visible no matter what is behind. For example, I will have an arbitrary alpha mask bitmap or texture, render it without a depth test after painting the scene, and all the pixels of the frame buffer under the masked (full alpha pixels) textures will be inverted.
I try to do this using texture, but I get some weird results, as well as all the mixing options that still find me confusing.
source
share