C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
bindingMap HardwareVertexBuffer>.Dictionary
highIndex short

Private Properties

Свойство Тип Описание
IsBufferBound bool

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
dispose ( bool disposeManagedResources ) : void

Приватные методы

Метод Описание
IsBufferBound ( short source ) : bool

Описание методов

GetBuffer() публичный Метод

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.
Результат HardwareVertexBuffer

SetBinding() публичный Метод

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.
Результат void

UnsetAllBindings() публичный Метод

Removes all current buffer bindings.
public UnsetAllBindings ( ) : void
Результат void

UnsetBinding() публичный Метод

Removes an existing binding.
public UnsetBinding ( short index ) : void
index short Index of the buffer binding to remove.
Результат void

dispose() защищенный Метод

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Результат void

Описание свойств

bindingMap защищенное свойство

Defines the vertex buffer bindings used as source for vertex declarations.
protected Dictionary bindingMap
Результат HardwareVertexBuffer>.Dictionary

highIndex защищенное свойство

The highest index in use for this binding.
protected short highIndex
Результат short