Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iVertexBufferManager Struct Reference

This interface represents the vertex buffer manager. More...

#include <vbufmgr.h>

Inheritance diagram for iVertexBufferManager:

iBase List of all members.

Public Methods

virtual iVertexBufferCreateBuffer (int priority)=0
 Create an empty vertex buffer. More...

virtual void ChangePriority (iVertexBuffer *buf, int new_priority)=0
 Change the priority of a vertex buffer. More...

virtual bool LockBuffer (iVertexBuffer *buf, csVector3 *verts, csVector2 *texels, csColor *colors, int num_verts, int buf_number)=0
 Lock this vertex buffer for use. More...

virtual void UnlockBuffer (iVertexBuffer *buf)=0
 Unlock a vertex buffer.

virtual iPolygonBufferCreatePolygonBuffer ()=0
 Create an empty polygon buffer. More...

virtual void AddClient (iVertexBufferManagerClient *client)=0
 A client using the services of the manager can register with it to receive information about the state of the manager.

virtual void RemoveClient (iVertexBufferManagerClient *client)=0

Detailed Description

This interface represents the vertex buffer manager.

You can use this to create vertex buffers which can be used by the 3D renderer.


Member Function Documentation

void iVertexBufferManager::ChangePriority ( iVertexBuffer * buf,
int new_priority ) [pure virtual]
 

Change the priority of a vertex buffer.

This can be used when some low-priority object becomes more important for example.

iVertexBuffer * iVertexBufferManager::CreateBuffer ( int priority ) [pure virtual]
 

Create an empty vertex buffer.

The ref count of this vertex buffer will be one. To remove it use DecRef(). The priority number can be anything. Higher numbers mean the vertex buffer is more important. A high priority vertex buffer should be used for objects that are visible often. Low priority vertex buffers should be used for objects that are rarely visible.

iPolygonBuffer * iVertexBufferManager::CreatePolygonBuffer ( ) [pure virtual]
 

Create an empty polygon buffer.

The ref count of this polygon buffer will be one. To remove it use DecRef().

bool iVertexBufferManager::LockBuffer ( iVertexBuffer * buf,
csVector3 * verts,
csVector2 * texels,
csColor * colors,
int num_verts,
int buf_number ) [pure virtual]
 

Lock this vertex buffer for use.

Only when the vertex buffer is locked are you allowed to make calls to iGraphics3D functions that actually use the vertex buffer. While the buffer is locked the arrays that are given here may not be modified or altered in any way! The buf_number indicates if the buffer has modified or not. You MUST call UnlockBuffer() when you are ready with the buffer. Deleting a vertex buffer with DecRef() automatically implies an UnlockBuffer().

This function will return false if the buffer could not be locked for some reason. This may happen if too many buffers are locked at the same time or if memory is low.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000