Device.UpdateTexture Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Updates the dirty portions of a texture.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Sub UpdateTexture ( _
    sourceTexture As BaseTexture, _
    destinationTexture As BaseTexture _
)
'Usage
Dim instance As Device
Dim sourceTexture As BaseTexture
Dim destinationTexture As BaseTexture

instance.UpdateTexture(sourceTexture, _
    destinationTexture)
public void UpdateTexture(
    BaseTexture sourceTexture,
    BaseTexture destinationTexture
)
public:
void UpdateTexture(
    BaseTexture^ sourceTexture, 
    BaseTexture^ destinationTexture
)
member UpdateTexture : 
        sourceTexture:BaseTexture * 
        destinationTexture:BaseTexture -> unit 

Parameters

Exceptions

Exception Condition
InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

Remarks

To dirty a portion of a texture, either lock it or call AddDirtyRectangle.

UpdateTexture retrieves the dirty portions of the texture by calculating what has been accumulated since the last update operation.

For performance reasons, dirty regions are recorded only for level 0 of a texture. For sublevels, it is assumed that the corresponding (scaled) rectangle or box is also dirty. Dirty regions are automatically recorded when LockRectangle is called without NoDirtyUpdate or ReadOnly. Also, the destination surface of UpdateTexture is marked dirty.

This method fails if the textures are of different types, if their bottom-level buffers are of different sizes, or if their matching levels do not match. For example, consider a six-level source texture with the following dimensions:

32x16, 16x8, 8x4, 4x2, 2x1, 1x1

This six-level source texture could be the source for the following one-level destination:

1x1

for the following two-level destination:

2x1, 1x1

or for the following three-level destination:

4x2, 2x1, 1x1

In addition, this method fails if the textures have different formats. If the destination texture has fewer levels than the source, only the matching levels are copied. If the source texture has fewer levels than the destination, the method fails.

If the source texture contains dirty regions, the copy operation can be optimized by restricting it to those regions only. It is not guaranteed that only those bytes marked dirty will be copied.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace