D3D9::VertexBuffer::LockedArea Class Reference

Locked area of vertex buffer used to access the vertices. More...

#include <dx9_wrap.h>

Collaboration diagram for D3D9::VertexBuffer::LockedArea:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LockedArea (VertexBuffer &m_VertexBuffer, int base_vertex, int count)
 Create vertex buffer locked region.

 ~LockedArea ()
 Unlock vertex buffer locked region.

void * get_ptr ()
void * get_ptr (int vertex_num)

Detailed Description

Locked area of vertex buffer used to access the vertices.


Constructor & Destructor Documentation

D3D9::VertexBuffer::LockedArea::LockedArea VertexBuffer m_VertexBuffer,
int  base_vertex,
int  count
 

Create vertex buffer locked region.

D3D9::VertexBuffer::LockedArea::~LockedArea  ) 
 

Unlock vertex buffer locked region.


Member Function Documentation

void * D3D9::VertexBuffer::LockedArea::get_ptr  ) 
 

Returns:
pointer to first vertex in locked vertex buffer memory region.
Note:
Returned type is void*, so to access the vertex data, you would need to cast this pointer to your vertex struct type (like one would do with C++ malloc()).
If your vertex data type is fixed and known at compile time, you better
use D3D9::VertexArray template class instead of D3D9::VertexBuffer!
Note:
Memory pointed to by this pointer will have enough bytes for get_vertex_size() vertices.

void * D3D9::VertexBuffer::LockedArea::get_ptr int  vertex_num  ) 
 

Returns:
pointer to given vertex in locked vertex buffer memory region.
Note:
Returned type is void*, so to access the vertex data, you would need to cast this pointer to your vertex struct type (like one would do with C++ malloc()).
If your vertex data type is fixed and known at compile time, you better
use D3D9::VertexArray template class instead of D3D9::VertexBuffer! Usage of D3D9::VertexBuffer is only needed when you must, at runtime, choose type of vertex data stored in vertex buffer.
Note:
Memory pointed to by this pointer will have enough bytes for get_capacity() - get_vertex_size() vertices.


The documentation for this class was generated from the following files:
Generated on Sun May 1 17:34:22 2005 for RealityStrike Game Engine API by doxygen 1.3.6