Microsoft DirectX 9.0 SDK Update (October 2004)

CubeTexture.LockRectangle Method

Language:

Note: This documentation is preliminary and is subject to change.

Locks a rectangle on a cube texture resource.

Definition

Visual Basic .NET Public Function LockRectangle( _
    ByVal faceType As CubeMapFace, _
    ByVal level As Integer, _
    ByVal rect As Rectangle, _
    ByVal flags As LockFlags _
) As GraphicsStream
C# public GraphicsStream LockRectangle(
    CubeMapFace faceType,
    int level,
    Rectangle rect,
    LockFlags flags
);
Managed C++ public: GraphicsStream* LockRectangle(
    CubeMapFace faceType,
    int level,
    Rectangle rect,
    LockFlags flags
);
JScript .NET public function LockRectangle(
    faceType : CubeMapFace,
    level : int,
    rect : Rectangle,
    flags : LockFlags
) : GraphicsStream;

Parameters

faceType Microsoft.DirectX.Direct3D.CubeMapFace. Member of the CubeMapFace enumerated type that identifies a cube map face.
level System.Int32. Level of a cube texture.
rect System.Drawing.Rectangle. A Rectangle Leave Site to lock. To expand the dirty region to cover the entire cube texture, omit this parameter.
flags Microsoft.DirectX.Direct3D.LockFlags. Zero or more LockFlags enumerated values that describe the type of lock to perform.

Return Value

Microsoft.DirectX.GraphicsStream . A GraphicsStream object that represents the locked rectangle.

Remarks

For performance reasons, dirty regions are recorded only for level 0 of a texture. Dirty regions are automatically recorded when CubeTexture.LockRectangle is called without NoDirtyUpdate or ReadOnly. For more information, see Device.UpdateTexture.

Cube textures created with Default are not lockable. Cube textures created in video memory are lockable when created with Usage.Dynamic. For more information about usages, see Dynamic.

The only lockable format for a depth stencil texture is Format.D16Lockable.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center