Copying Textures in dx9 really fast
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 ?
In D3D9 you can use StrechtRect.
D3D10 has a function that makes the same thing
D3D10 has a function that makes the same thing
ID3D10Device::CopySubresourceRegionCopy a region from a source resource to a destination resource.void CopySubresourceRegion( ID3D10Resource *pDstResource, UINT DstSubresource, UINT DstX, UINT DstY, UINT DstZ, ID3D10Resource *pSrcResource, UINT SrcSubresource, const D3D10_BOX *pSrcBox);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement