I'm pretty much a newbie with opengl. I imagine glReadPixels is horrible so whats the best way to do this? I was thinking of having a function that locks a texture rect, do something like glTexSubImage2D to copy the pixels to RAM, modify it, then use glTexSubImage2D to copy the ram back into the texture. Is this a good way? I can think of optimizations like a flag saying not to copy the texture since you'll be overwriting it all and caching.I'm pretty much a newbie with opengl. I imagine