crystalspace.jbind.interfaces.ivideo.vbufmgr
Interface iVertexBufferManager

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csVertexBufferManager

public interface iVertexBufferManager
extends iBase

Author:
Java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/pubapi/structiVertexBufferManager.php

Method Summary
 void addClient(iVertexBufferManagerClient client)
          A client using the services of the manager can register with it to receive information about the state of the manager.
 void changePriority(iVertexBuffer buf, int new_priority)
          Change the priority of a vertex buffer.
 iVertexBuffer createBuffer(int priority)
          Create an empty vertex buffer.
 iPolygonBuffer createPolygonBuffer()
          Create an empty polygon buffer.
 boolean lockBuffer(iVertexBuffer buf, csVector3[] verts, csVector2[] texels, csColor[] colors, int buf_number, csBox3 bbox)
          Lock this vertex buffer for use.
 void unlockBuffer(iVertexBuffer buf)
          Unlock a vertex buffer.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Method Detail

addClient

public void addClient(iVertexBufferManagerClient client)
A client using the services of the manager can register with it to receive information about the state of the manager.

Parameters:
client -

changePriority

public void changePriority(iVertexBuffer buf,
                           int new_priority)
Change the priority of a vertex buffer. This can be used when some low-priority object becomes more important for example.

Parameters:
buf -
new_priority -

createBuffer

public iVertexBuffer createBuffer(int priority)
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.

Parameters:
priority -
Returns:

createPolygonBuffer

public iPolygonBuffer createPolygonBuffer()
Create an empty polygon buffer. The ref count of this polygon buffer will be one. To remove it use DecRef();.

Returns:

lockBuffer

public boolean lockBuffer(iVertexBuffer buf,
                          csVector3[] verts,
                          csVector2[] texels,
                          csColor[] colors,
                          int buf_number,
                          csBox3 bbox)
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.

Parameters:
buf -
verts -
texels -
colors -
buf_number -
bbox -
Returns:

unlockBuffer

public void unlockBuffer(iVertexBuffer buf)
Unlock a vertex buffer.

Parameters:
buf -