Skip to main content
gamedev.net
🔒 Locked

Swap function

Started by shyampm 3 replies 900+ views
Original Post
shyampm
shyampm
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.
tok_junior
tok_junior
Sure, IDirect3DDevice9::UpdateSurface()
streamer
streamer
You may check something like this.
shyampm
shyampm
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.
Evil Steve
Evil Steve
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().

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.