IDirect3DVolumeTexture9::LockBox method (d3d9.h)

Locks a box on a volume texture resource.

Syntax

HRESULT LockBox(
  [in]  UINT          Level,
  [out] D3DLOCKED_BOX *pLockedVolume,
  [in]  const D3DBOX  *pBox,
  [in]  DWORD         Flags
);

Parameters

[in] Level

Type: UINT

Specifies the level of the volume texture resource to lock.

[out] pLockedVolume

Type: D3DLOCKED_BOX*

Pointer to a D3DLOCKED_BOX structure, describing the locked region.

[in] pBox

Type: const D3DBOX*

Pointer to the volume to lock. This parameter is specified by a pointer to a D3DBOX structure. Specifying NULL for this parameter locks the entire volume level.

[in] Flags

Type: DWORD

Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:

  • D3DLOCK_DISCARD
  • D3DLOCK_NO_DIRTY_UPDATE
  • D3DLOCK_NOSYSLOCK
  • D3DLOCK_READONLY
For a description of the flags, see D3DLOCK.

Return value

Type: HRESULT

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. Dirty regions are automatically recorded when LockBox is called without D3DLOCK_NO_DIRTY_UPDATE or D3DLOCK_READONLY. For more information, see UpdateTexture.

Requirements

Requirement Value
Target Platform Windows
Header d3d9.h (include D3D9.h)
Library D3D9.lib

See also

IDirect3DVolumeTexture9

UnlockBox