|Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members|
|virtual const std::map< u16, |
VertexBuffer * > &
|getBindings () const|
|Gets a read-only version of the buffer bindings. |
|virtual VertexBuffer *||getBuffer (u16 index)|
|Gets the buffer bound to the given source index. |
|virtual u16||getNextIndex ()|
|virtual void||setBinding (u16 index, VertexBuffer *buffer)|
|virtual void||unsetAllBindings ()|
|Removes all the bindings. |
|virtual void||unsetBinding (u16 index)|
|Removes an existing binding. |
|std::map< u16, VertexBuffer * >||mBindingMap|
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the input data it needs for the vertex elements.
In the underlying APIs, binding the vertex buffers to an index (or 'stream') is the way that vertex data is linked, so this structure better reflects the realities of that. In addition, by separating the vertex declaration from the list of vertex buffer bindings, it becomes possible to reuse bindings between declarations and vice versa, giving opportunities to reduce the state changes to perform rendering.
|const std::map< u16, VertexBuffer * > & render::VertexBufferBinding::getBindings||(||)|| const
Gets a read-only version of the buffer bindings.
Gets the highest index which has already been set, plus 1.
This is to assist in binding the vertex buffers such that there are not gaps in the list.
Set a binding, associating a vertex buffer with a given index.
If the index is already associated with a vertex buffer, the association will be replaced. This may cause the old buffer to be destroyed if nothing else is referring to it. You should assign bindings from 0 and not leave gaps, although you can bind them in any order.