C# Class Axiom.Graphics.VertexBufferBinding

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.
Why do we have this binding list rather than just have VertexElement referring to the vertex buffers direct? Well, 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 required to perform rendering.
显示文件 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
bindingMap HardwareVertexBuffer>.Dictionary
highIndex short

Private Properties

Property Type Description
IsBufferBound bool

Public Methods

Method Description
GetBuffer ( short index ) : HardwareVertexBuffer

Gets the buffer bound to the given source index.

SetBinding ( short index, HardwareVertexBuffer buffer ) : void

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.

UnsetAllBindings ( ) : void

Removes all current buffer bindings.

UnsetBinding ( short index ) : void

Removes an existing binding.

Protected Methods

Method Description
dispose ( bool disposeManagedResources ) : void

Private Methods

Method Description
IsBufferBound ( short source ) : bool

Method Details

GetBuffer() public method

Gets the buffer bound to the given source index.
public GetBuffer ( short index ) : HardwareVertexBuffer
index short Index of the binding to retreive the buffer for.
return HardwareVertexBuffer

SetBinding() public method

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.
public SetBinding ( short index, HardwareVertexBuffer buffer ) : void
index short Index at which to bind the buffer.
buffer HardwareVertexBuffer Vertex buffer to bind.
return void

UnsetAllBindings() public method

Removes all current buffer bindings.
public UnsetAllBindings ( ) : void
return void

UnsetBinding() public method

Removes an existing binding.
public UnsetBinding ( short index ) : void
index short Index of the buffer binding to remove.
return void

dispose() protected method

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void

Property Details

bindingMap protected_oe property

Defines the vertex buffer bindings used as source for vertex declarations.
protected Dictionary bindingMap
return HardwareVertexBuffer>.Dictionary

highIndex protected_oe property

The highest index in use for this binding.
protected short highIndex
return short