2 out of 3 rated this helpful - Rate this topic

D3DLOCKED_RECT structure

Applies to: desktop apps only

Describes a locked rectangular region.

Syntax

typedef struct D3DLOCKED_RECT {
  INT  Pitch;
  void *pBits;
} D3DLOCKED_RECT, *LPD3DLOCKED_RECT;

Members

Pitch

Type: INT

Number of bytes in one row of the surface.

pBits

Type: void*

Pointer to the locked bits. If a RECT was provided to the LockRect call, pBits will be appropriately offset from the start of the surface.

Remarks

The pitch for DXTn formats is different from what was returned in DirectX 7. It now refers to the number of bytes in a row of blocks. For example, if you have a width of 16, then you will have a pitch of 4 blocks (4*8 for DXT1, 4*16 for DXT2-5.)

Requirements

Header

D3D9Types.h

See also

IDirect3DCubeTexture9::LockRect
IDirect3DSurface9::LockRect
IDirect3DTexture9::LockRect

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ