Texture.LockRectangle Method (Int32, Rectangle, LockFlags, Int32%)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Locks a rectangle on a texture resource.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Function LockRectangle ( _
level As Integer, _
rect As Rectangle, _
flags As LockFlags, _
<OutAttribute> ByRef pitch As Integer _
) As GraphicsStream
'Usage
Dim instance As Texture
Dim level As Integer
Dim rect As Rectangle
Dim flags As LockFlags
Dim pitch As Integer
Dim returnValue As GraphicsStream
returnValue = instance.LockRectangle(level, _
rect, flags, pitch)
public GraphicsStream LockRectangle(
int level,
Rectangle rect,
LockFlags flags,
out int pitch
)
public:
GraphicsStream^ LockRectangle(
int level,
Rectangle rect,
LockFlags flags,
[OutAttribute] int% pitch
)
member LockRectangle :
level:int *
rect:Rectangle *
flags:LockFlags *
pitch:int byref -> GraphicsStream
Parameters
- level
Type: System.Int32
A minmap level of the texture resource to lock.
- rect
Type: System.Drawing.Rectangle
A Rectangle to lock. To expand the dirty region to cover the entire texture, omit this parameter.
- flags
Type: Microsoft.WindowsMobile.DirectX.Direct3D.LockFlags
Zero or more LockFlags values that describe the type of lock to perform. For this method, the valid flags are Discard, NoDirtyUpdate, and ReadOnly.
- pitch
Type: System.Int32%
Pitch of the returning data.
Return Value
Type: Microsoft.WindowsMobile.DirectX.GraphicsStream
A GraphicsStream that describes the locked region.
Remarks
Textures created in video memory are lockable when created with Dynamic specified for a Usage.
For performance reasons, dirty regions are recorded only for level 0 of a texture. Dirty regions are automatically recorded when LockRectangle does not recognize. These can be locked.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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