D3D9::VertexBuffer Class Reference

Vertex buffer holding array of verices in videomemory (for possbily better alternative see D3D9::VertexArray). More...

#include <dx9_wrap.h>

Collaboration diagram for D3D9::VertexBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 VertexBuffer (Device &n_device, int vertex_size, int vertex_count, DWORD vertex_caps=0)
 Create vertex buffer resource.

int get_capacity () const
 Retrieve how many vertices this vertex buffer can hold (capacity).

int get_vertex_size () const
 Retrieve size (in bytes) of single vertex instance stored in the buffer.

int get_vertex_caps () const
 Retrieve vertex "caps" flags.

void select (int stream_index=0)
 Select this vertex buffer as active for device input stream "stream_index" on attached render device.


Detailed Description

Vertex buffer holding array of verices in videomemory (for possbily better alternative see D3D9::VertexArray).

Note:
Using D3D9::VertexBuffer can be clumsy and will require usage of C++ type casting because it hold "untyped" values. Type casting is usually not a good practice and is not very intuitive either, hence, do not use this class unless you absolutely need to dynamically, at runtime, decide the format of vertex buffer elements. In most cases, consider D3D9::VertexArray class!
To see the difference between D3D9::VertexBuffer and D3D9::VertexArray please read
documentation for D3D9::VertexBuffer::LockedArea and D3D9::VertexArray:LockedArea classes.


Constructor & Destructor Documentation

D3D9::VertexBuffer::VertexBuffer Device n_device,
int  vertex_size,
int  vertex_count,
DWORD  vertex_caps = 0
 

Create vertex buffer resource.


Member Function Documentation

int D3D9::VertexBuffer::get_capacity  )  const [inline]
 

Retrieve how many vertices this vertex buffer can hold (capacity).

int D3D9::VertexBuffer::get_vertex_size  )  const [inline]
 

Retrieve size (in bytes) of single vertex instance stored in the buffer.

int D3D9::VertexBuffer::get_vertex_caps  )  const [inline]
 

Retrieve vertex "caps" flags.

This is usually 0, but can be value of legacy "FVF" bit mask (see Direct3D v9 documentation).

void D3D9::VertexBuffer::select int  stream_index = 0  ) 
 

Select this vertex buffer as active for device input stream "stream_index" on attached render device.

Default stream index (when not specified) is 0.


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