zoukankan      html  css  js  c++  java
  • IDirect3DVertexBuffer9::Lock和IDirect3DIndexBuffer9::Lock

    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.
  • 相关阅读:
    DDD实战2 创建领域基础类库项目
    DDD实战1
    MVC中 跳转出某一个Area的方法
    在codefirst迁移的时候 为新增的属性添加一个默认值
    在.net MVC项目中使用ajax进行数据验证
    将枚举转成SelectListItem
    在.net MVC项目的区域中使用模板页
    在MVC项目中分页使用MvcPager插件
    通过控制台查看电脑中.net framework的版本
    全面了解浏览器(内核)发展史
  • 原文地址:https://www.cnblogs.com/wonderKK/p/2240301.html
Copyright © 2011-2022 走看看