3

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.

Petr Kalandra
  • 335
  • 2
  • 7
  • 2
    Do you want to copy it pixel by pixel into another texture with different dimensions, just make a copy of it with another name, or mix it with another texture like two semi-transparent images? – user1306322 Nov 04 '12 at 14:00
  • I have one RTT and I am rendering alpha mask inside it. And I need to have function for making its exact copy for later use (Any following rendering into RTT should not modify the cloned one). – Petr Kalandra Nov 04 '12 at 14:17
  • The reason I dont want to use RTT is just because I dont need to modify the cloned texture anymore. – Petr Kalandra Nov 04 '12 at 14:21

1 Answers1

1

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.

Seth Battin
  • 2,811
  • 22
  • 36