Advertisement Jump to content
Sign in to follow this  

Copying Textures in dx9 really fast

This topic is 3846 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, I have to copy rectangles from one texture into another and I have to do it really fast. And I have to do it without "stretchrect" because I will have to port it to DX10 and its not available there. The only only way I know how to do this is by making the destination surface a rendertarget and rendering a square (with the sourcetarget) into it. Problem is that there are some pixels differently, some are a little stretched some are a little squished... it's just not the same on a per-pixel level and its very noticeable. I sometimes have to continue copying the copied texture and the glitches get worse and worse... Is there a better (and also fast) way to do this ?

Share this post

Link to post
Share on other sites
In D3D9 you can use StrechtRect.

D3D10 has a function that makes the same thing

Copy a region from a source resource to a destination resource.

void CopySubresourceRegion(
ID3D10Resource *pDstResource,
UINT DstSubresource,
ID3D10Resource *pSrcResource,
UINT SrcSubresource,
const D3D10_BOX *pSrcBox

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!