CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iVertexBufferManager Struct Reference
[3D]

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

#include <vbufmgr.h>

Inheritance diagram for iVertexBufferManager:

iBase List of all members.

Public Methods

virtual csPtr< 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, const csBox3 &bbox)=0
 Lock this vertex buffer for use. More...

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

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. More...


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.

Definition at line 194 of file vbufmgr.h.


Member Function Documentation

virtual void iVertexBufferManager::AddClient iVertexBufferManagerClient   client [pure virtual]
 

A client using the services of the manager can register with it to receive information about the state of the manager.

virtual 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.

virtual csPtr<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.

virtual 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().

virtual bool iVertexBufferManager::LockBuffer iVertexBuffer   buf,
csVector3   verts,
csVector2   texels,
csColor   colors,
int    num_verts,
int    buf_number,
const csBox3   bbox
[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.

virtual void iVertexBufferManager::UnlockBuffer iVertexBuffer   buf [pure virtual]
 

Unlock a vertex buffer.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14