IDirect 3 DVertexBuffer 9::LockとIDirect 3 DIndexBuffer 9::Lock

2882 ワード

IDirect3DVertexBuffer9::Lock


Locks a range of vertex data and obtains a pointer to the vertex buffer memory.
HRESULT Lock( UINT OffsetToLock,  UINT SizeToLock,  VOID ** ppbData,  DWORD Flags  ); 
OffsetToLock SizeToLock 0 ,  

Parameters


OffsetToLock
[in] Offset into the vertex data to lock, in bytes. To lock the entire vertex buffer, specify 0 for both parameters, SizeToLock and OffsetToLock.
SizeToLock
[in] Size of the vertex data to lock, in bytes. To lock the entire vertex buffer, specify 0 for both parameters, SizeToLock and OffsetToLock.
ppbData
[out] VOID* pointer to a memory buffer containing the returned vertex data.
Flags
[in] 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
  • D3DLOCK_NOOVERWRITE

  • For a description of the flags, see
    D3DLOCK .
     
     

    IDirect3DIndexBuffer9::Lock


    Locks a range of index data and obtains a pointer to the index buffer memory.
    HRESULT Lock( UINT OffsetToLock, UINT SizeToLock, VOID ** ppbData, DWORD Flags ); 

    Parameters


    OffsetToLock
    [in] Offset into the index data to lock, in bytes. Lock the entire index buffer by specifying 0 for both parameters, SizeToLock and OffsetToLock.
    SizeToLock
    [in] Size of the index data to lock, in bytes. Lock the entire index buffer by specifying 0 for both parameters, SizeToLock and OffsetToLock.
    ppbData
    [out] VOID* pointer to a memory buffer containing the returned index data.
    Flags
    [in] 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
  • D3DLOCK_NOOVERWRITE

  • For a description of the flags, see
    D3DLOCK .