Partager via


IDirect3DTexture8::AddDirtyRect

This method adds a dirty region to a texture resource.

HRESULT AddDirtyRect(
  CONST RECT* pDirtyRect
);

Parameters

  • pDirtyRect
    [in] Pointer to a RECT structure, specifying the dirty region to add. Specifying NULL expands the dirty region to cover the entire texture.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

For performance reasons, dirty regions are only recorded for level zero of a texture. For sublevels, it is assumed that the corresponding (scaled) rectangle or box is also dirty. Dirty regions are automatically recorded when LockRect or LockBox is called without D3DLOCK_NO_DIRTY_UPDATE or D3DLOCK_READONLY. Also, the destination surface of a CopyRects call is marked dirty.

Applications can optimize what subset of a resource is copied by specifying dirty regions on the resource.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

RECT | IDirect3DTexture8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.