Sign in to follow this  

Copying Textures in dx9 really fast

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

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