texture to texture blitter in hardware?

Started by
1 comment, last by Solias 16 years ago
Is there a way to blitter a texture stored in an FBO to another texture? My code updates a texture by doing some math on the texels, but it needs to write the results back to the original texture for storage. This is a three-step process right now where the fragment program does the math and writes the results to the FBO and then the FBO gets read into CPU memory and finally written back to source texture. Very klunky indeed. It would be nice if the results could be written directly to source texture, but I don't think you can do that. Any suggestions for a more efficient method?
Advertisement
never mind. found it. [ glBlitFramebufferEXT(...) ]
One common approach is to use two textures and ping pong back and forth each frame or pass. So say you have textures A and B. On the first frame A is the source and B is the destination, then on the next frame B is the source and A is the destination. This uses more memory, but saves you the extra copy.

This topic is closed to new replies.

Advertisement