Microsoft DirectX 8.1 (Visual Basic) |
Copies rectangular subsets of pixels from one surface to another.
object.CopyRects( _ SourceSurface As Direct3DSurface8, _ FirstElementOfSourceRectsArray As Any, _ NumberOfRects As Long, _ DestinationSurface As Direct3DSurface8, _ FirstElementofDestPointArray As Any)
If the method fails, an error is raised and Err.Number can be set to one of the following values.
D3DERR_INVALIDCALL |
D3DERR_DEVICELOST |
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
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 a level-zero of a texture, then it will be marked dirty. See Direct3DDevice8.UpdateTexture and Direct3DTexture8.AddDirtyRect for more details.
This method cannot be applied to surfaces whose formats are classified as depth stencil formats.
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.