Jump to content
  • Advertisement
Sign in to follow this  

texture to texture blitter in hardware?

This topic is 3695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!