Microsoft DirectX 8.1 (C++) |
Copies rectangular subsets of pixels from one surface to another.
HRESULT CopyRects( IDirect3DSurface8* pSourceSurface, CONST RECT* pSourceRectsArray, UINT cRects, IDirect3DSurface8* pDestinationSurface, CONST POINT* pDestPointsArray );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
D3DERR_DEVICELOST |
D3DERR_INVALIDCALL |
This method does not support stretch, color key, alpha blend, format conversion, or clipping of either source or destination rectangles. Note that this method will fail unless all the source rectangles and their corresponding destination rectangles are completely contained within the source and destination surfaces respectively. The format of the two surfaces must match, but they can have different dimensions.
If the destination surface is level zero of a texture, then it will be marked dirty. See IDirect3DDevice8::UpdateTexture and IDirect3DTexture8::AddDirtyRect for more details.
This method cannot be applied to surfaces whose formats are classified as depth stencil formats.
A POINT structure defines the x- and y- coordinates of a point. For more information on POINT, see the Microsoft® Platform Software Development Kit (SDK).
This method can return D3DERR_DEVICELOST when the source object is in volatile memory (D3DPOOL_DEFAULT) and the destination object is in nonvolatile memory (D3DPOOL_SYSTEMMEM or D3DPOOL_MANAGED). For more information, see Lost Devices.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.