Sign in to follow this  
shyampm

Swap function

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this