/// <summary> /// Unlocks /// </summary> public void Unlock( ) { if ( m_VertexBufferLock != null ) { m_VertexBufferLock.Dispose( ); m_VertexBufferLock = null; } }
/// <summary> /// Locks a region of the vertex buffer /// </summary> /// <returns>Returns a pointer into the buffer memory</returns> /// <remarks> /// Dispose of the lock object to commit the changes to the buffer /// </remarks> public unsafe void* Lock( bool read, bool write ) { Unlock( ); m_VertexBufferLock = m_Owner.VertexBuffer.Lock( m_FirstVertexIndex, m_VertexCount, read, write ); return m_VertexBufferLock.Bytes; }