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.
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Свойство Type Description
bindingMap HardwareVertexBuffer>.Dictionary
highIndex short

Private Properties

Свойство Type Description
IsBufferBound bool

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
dispose ( bool disposeManagedResources ) : void

Private Methods

Méthode Description
IsBufferBound ( short source ) : bool

Method Details

GetBuffer() public méthode

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.
Résultat HardwareVertexBuffer

SetBinding() public méthode

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.
Résultat void

UnsetAllBindings() public méthode

Removes all current buffer bindings.
public UnsetAllBindings ( ) : void
Résultat void

UnsetBinding() public méthode

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

dispose() protected méthode

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Résultat void

Property Details

bindingMap protected_oe property

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

highIndex protected_oe property

The highest index in use for this binding.
protected short highIndex
Résultat short