Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XNA 4 - Texture clone

I need to copy content of one texture2d to another (both stored in VRAM)? Is this even possible without using RTT or any additional RAM-VRAM transfers? Just pure BLIT between two textures in VRAM.

Thanks in advance! I am not able to figure it out.

like image 658
Petr Kalandra Avatar asked Dec 05 '25 16:12

Petr Kalandra


1 Answers

Using a RenderTarget does not remove the data from VRAM. It can be reused in a subsequent draw call as a texture without returning it to RAM. However, if you need to perform operations on it in code, like with getData(), then it will move out of video memory.

like image 118
Seth Battin Avatar answered Dec 08 '25 20:12

Seth Battin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!