• Advertisement
Sign in to follow this  

Swap function

This topic is 4185 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

Hi guys, I would be glad if anyone of you could let me know if there is a function in Direct3d which can be used to copy elements from a texture and put them into another texture. thanks.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

Well, i actually made a mistake in specifying what i was looking for....I am trying to swap elements between two textures...could you please let me know if that is possible.

thanks.

Share this post


Link to post
Share on other sites
IDirect3DDevice9::UpdateSurface() or IDirect3DDevice9::UpdateTexture() will do the trick. IDirect3DDevice9::UpdateTexture() won't let you specify a subsection of the texture to copy though.

You can get a surface from a texture via IDirect3DTexture9::GetSurfaceLevel().

Share this post


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

  • Advertisement